summaryrefslogtreecommitdiff
path: root/games/grdc
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2017-07-13 02:57:53 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2017-07-13 02:57:53 +0000
commit22417e592bb4f3ecb9e0c9140acc4fc9fcda24dc (patch)
tree60aea38d722d0ca4595326ec453c553185d85124 /games/grdc
parent32767958cc76298ced07a4faae09ceba48ecb77f (diff)
Convert fprintf(stderr, ...) to errx/warnx (with slight change of output).
From Scott Cheloha
Diffstat (limited to 'games/grdc')
-rw-r--r--games/grdc/grdc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c
index e1d770b46dd..9c9ef0518f9 100644
--- a/games/grdc/grdc.c
+++ b/games/grdc/grdc.c
@@ -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();