From 0298dec4eb2e74946b4d8e3e001799c0bf06aab0 Mon Sep 17 00:00:00 2001 From: Ray Lai Date: Sat, 7 Apr 2007 00:40:44 +0000 Subject: Use __progname and warn instead of fprintf where appropriate. --- usr.bin/sendbug/sendbug.c | 11 ++++++----- 1 file 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 . @@ -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)) { -- cgit v1.2.3