diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-04-07 00:40:44 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-04-07 00:40:44 +0000 |
commit | 0298dec4eb2e74946b4d8e3e001799c0bf06aab0 (patch) | |
tree | 45148a46f39101db7921cc84bdbeef0e8632c26f | |
parent | 15e2355956a8f68c0fb5693a94965a2bfb4fcb37 (diff) |
Use __progname and warn instead of fprintf where appropriate.
-rw-r--r-- | usr.bin/sendbug/sendbug.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 6e2fb67110e..c849059a565 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.40 2007/04/07 00:24:59 ray Exp $ */ +/* $OpenBSD: sendbug.c,v 1.41 2007/04/07 00:40:43 ray Exp $ */ /* * Written by Ray Lai <ray@cyth.net>. @@ -51,7 +51,9 @@ int wantcleanup; __dead void usage(void) { - fprintf(stderr, "usage: sendbug [-DLPV]\n"); + extern char *__progname; + + fprintf(stderr, "usage: %s [-DLPV]\n", __progname); exit(1); } @@ -120,9 +122,8 @@ main(int argc, char *argv[]) frfp = fopen(pr_form, "r"); if (frfp == NULL) { - fprintf(stderr, "sendbug: can't seem to read your" - " template file (`%s'), ignoring PR_FORM\n", - pr_form); + warn("can't seem to read your template file " + "(`%s'), ignoring PR_FORM", pr_form); template(fp); } else { while (!feof(frfp)) { |