summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 12:29:03 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 12:29:03 -0800
commit06186d82c57b2545db2d6b1a6665f23d1b6a3cfd (patch)
treeb7ed023556ace6cafd037590ef4ddcd82e58d969
parent701d5f797a77ba3b3ff2d8c25b7951563d7e4363 (diff)
-help should not fail if display cannot be opened
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xstdcmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xstdcmap.c b/xstdcmap.c
index 0c4c934..0e73158 100644
--- a/xstdcmap.c
+++ b/xstdcmap.c
@@ -339,16 +339,16 @@ main(int argc, char *argv[])
parse(argc, argv);
+ if (help) {
+ usage(0);
+ }
+
if ((dpy = XOpenDisplay(display_name)) == NULL) {
(void) fprintf(stderr, "%s: cannot open display \"%s\".\n",
program_name, XDisplayName(display_name));
exit(1);
}
- if (help) {
- usage(0);
- }
-
if (all) {
if (verbose)
(void) fprintf(stderr,