summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2017-07-13 02:57:52 +0000
committertb <tb@openbsd.org>2017-07-13 02:57:52 +0000
commit9ab6e3d4aba4e97069443ae9a8e079597de63475 (patch)
tree3fe86d0f6f2ad1f6be437cba78486a737a79fe73
parentUse an umlaut in Mobius and uppercase one instance of möbius visible in (diff)
downloadwireguard-openbsd-9ab6e3d4aba4e97069443ae9a8e079597de63475.tar.xz
wireguard-openbsd-9ab6e3d4aba4e97069443ae9a8e079597de63475.zip
Convert fprintf(stderr, ...) to errx/warnx (with slight change of output).
From Scott Cheloha
-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();