- Fix warnings reported by the gcc analyzer.

This commit is contained in:
W.C.A. Wijngaards
2021-06-23 18:02:02 +02:00
parent 7694998ea9
commit d3b2bc501d
8 changed files with 53 additions and 9 deletions
+4 -1
View File
@@ -347,7 +347,10 @@ static volatile int do_quit = 0;
/** signal handler for user quit */
static RETSIGTYPE delayer_sigh(int sig)
{
printf("exit on signal %d\n", sig);
char str[] = "exit on signal \n";
str[15] = '0' + (sig/10)%10;
str[16] = '0' + sig%10;
write(STDOUT_FILENO, str, strlen(str));
do_quit = 1;
}