summaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-06-03 15:05:12 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-06-03 15:05:12 -0500
commit78187f5e6597d7b8ac6a21d95555f181f15127c7 (patch)
tree79727d6e41306714fa2fb979ef23aa4381c1b26b /dwl.c
parent525bf258e438bd81db917c948b42684201351338 (diff)
document -qvd options
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/dwl.c b/dwl.c
index 72f969e..6646494 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1470,14 +1470,11 @@ main(int argc, char *argv[])
startup_cmd = optarg;
break;
default:
- printf("Usage: %s [-s startup command]\n", argv[0]);
- return EXIT_FAILURE;
+ goto usage;
}
}
- if (optind < argc) {
- printf("Usage: %s [-s startup command]\n", argv[0]);
- return EXIT_FAILURE;
- }
+ if (optind < argc)
+ goto usage;
wlr_log_init(loglevel, NULL);
/* The Wayland display is managed by libwayland. It handles accepting
@@ -1491,4 +1488,8 @@ main(int argc, char *argv[])
wl_display_destroy_clients(dpy);
wl_display_destroy(dpy);
return EXIT_SUCCESS;
+
+usage:
+ printf("Usage: %s [-qvd] [-s startup command]\n", argv[0]);
+ return EXIT_FAILURE;
}