dmenu: use die() to print the usage message
authorTom Schwindl <schwindl@posteo.de>
Mon, 26 Sep 2022 09:24:15 +0000 (09:24 +0000)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 1 Oct 2022 11:20:40 +0000 (13:20 +0200)
dmenu.c

diff --git a/dmenu.c b/dmenu.c
index 818313aafd0fbdf7c56060b1e78daf023e3a5271..7cf253b09a4ddb8136d4b32758fa4c88445e08e2 100644 (file)
--- a/dmenu.c
+++ b/dmenu.c
@@ -710,9 +710,8 @@ setup(void)
 static void
 usage(void)
 {
-       fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
-             "             [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
-       exit(1);
+       die("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
+           "             [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]");
 }
 
 int