diff options
author | Omar Polo <op@omarpolo.com> | 2021-06-29 10:50:39 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-06-29 10:50:39 +0000 |
commit | 9327bc045a93253310a3b6933e8bd96d27298185 (patch) | |
tree | 7ad5942cc973ebd89f8b36265aa3f6c3c97697e7 | |
parent | 5777923bb08a51b04537a127c8514186cd276a70 (diff) |
use getprogname() in usage()
-rw-r--r-- | gmid.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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; } } |