1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Convert fprintf(stderr, ...) to errx/warnx (with slight change of output).

From Scott Cheloha
This commit is contained in:
tb 2017-07-13 02:57:52 +00:00
parent 2e6acff8f7
commit 9ab6e3d4ab

View File

@ -1,4 +1,4 @@
/* $OpenBSD: grdc.c,v 1.26 2016/03/07 12:07:56 mestre Exp $ */
/* $OpenBSD: grdc.c,v 1.27 2017/07/13 02:57:52 tb Exp $ */
/*
*
* Copyright 2002 Amos Shapir. Public domain.
@ -90,7 +90,7 @@ main(int argc, char *argv[])
if (argc == 1) {
n = strtonum(*argv, 1, INT_MAX, &errstr);
if (errstr) {
fprintf(stderr, "number of seconds is %s\n", errstr);
warnx("number of seconds is %s", errstr);
usage();
}
}
@ -232,9 +232,7 @@ main(int argc, char *argv[])
clear();
refresh();
endwin();
fprintf(stderr, "%s terminated by signal %d\n",
getprogname(), sigtermed);
return 1;
errx(1, "terminated by signal %d", sigtermed);
}
} while (n == 0 || nowtv.tv_sec < endtv.tv_sec);
standend();