summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.c9
-rw-r--r--util.c6
2 files changed, 7 insertions, 8 deletions
diff --git a/main.c b/main.c
index 27e2627..6035fb6 100644
--- a/main.c
+++ b/main.c
@@ -179,14 +179,13 @@ main(int argc, char *argv[])
179 179
180 for(i = 1; (i < argc) && (argv[i][0] == '-'); i++) { 180 for(i = 1; (i < argc) && (argv[i][0] == '-'); i++) {
181 switch (argv[i][1]) { 181 switch (argv[i][1]) {
182 case 'v':
183 fprintf(stdout, "%s",
184 "dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n");
185 exit(0);
186 break;
187 default: 182 default:
188 eprint("usage: dwm [-v]\n"); 183 eprint("usage: dwm [-v]\n");
189 break; 184 break;
185 case 'v':
186 fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout);
187 exit(EXIT_SUCCESS);
188 break;
190 } 189 }
191 } 190 }
192 191
diff --git a/util.c b/util.c
index 3e5fd1e..1e36b25 100644
--- a/util.c
+++ b/util.c
@@ -17,7 +17,7 @@ bad_malloc(unsigned int size)
17{ 17{
18 fprintf(stderr, "fatal: could not malloc() %d bytes\n", 18 fprintf(stderr, "fatal: could not malloc() %d bytes\n",
19 (int) size); 19 (int) size);
20 exit(1); 20 exit(EXIT_FAILURE);
21} 21}
22 22
23/* extern */ 23/* extern */
@@ -37,7 +37,7 @@ eprint(const char *errstr, ...) {
37 va_start(ap, errstr); 37 va_start(ap, errstr);
38 vfprintf(stderr, errstr, ap); 38 vfprintf(stderr, errstr, ap);
39 va_end(ap); 39 va_end(ap);
40 exit(1); 40 exit(EXIT_FAILURE);
41} 41}
42 42
43void 43void
@@ -55,7 +55,7 @@ spawn(Arg *arg)
55 fprintf(stderr, "dwm: execvp %s", argv[0]); 55 fprintf(stderr, "dwm: execvp %s", argv[0]);
56 perror(" failed"); 56 perror(" failed");
57 } 57 }
58 exit (0); 58 exit(EXIT_FAILURE);
59 } 59 }
60 wait(0); 60 wait(0);
61} 61}