aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-06-29 10:50:39 +0000
committerOmar Polo <op@omarpolo.com>2021-06-29 10:50:39 +0000
commit9327bc045a93253310a3b6933e8bd96d27298185 (patch)
tree7ad5942cc973ebd89f8b36265aa3f6c3c97697e7
parent5777923bb08a51b04537a127c8514186cd276a70 (diff)
use getprogname() in usage()
-rw-r--r--gmid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gmid.c b/gmid.c
index 7337a9a..81f69db 100644
--- a/gmid.c
+++ b/gmid.c
@@ -378,12 +378,12 @@ drop_priv(void)
}
static void
-usage(const char *me)
+usage(void)
{
fprintf(stderr,
"USAGE: %s [-fn] [-c config] [-P pidfile] | [-6h] [-d certs-dir] [-H host]\n"
" [-p port] [-x cgi] [dir]\n",
- me);
+ getprogname());
}
static void
@@ -441,7 +441,7 @@ serve(int argc, char **argv, struct imsgbuf *ibuf)
l->dir = absolutify_path(argv[0]);
break;
default:
- usage(getprogname());
+ usage();
return 1;
}
@@ -561,7 +561,7 @@ main(int argc, char **argv)
break;
case 'h':
- usage(*argv);
+ usage();
return 0;
case 'n':
@@ -594,7 +594,7 @@ main(int argc, char **argv)
break;
default:
- usage(*argv);
+ usage();
return 1;
}
}