projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc8784e
)
opt: print usage correctly for early args.
author
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 9 May 2018 03:09:47 +0000
(12:39 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 9 May 2018 03:09:47 +0000
(12:39 +0930)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/opt/usage.c
patch
|
blob
|
history
diff --git
a/ccan/opt/usage.c
b/ccan/opt/usage.c
index 353d59bc48542d8423ddc3c437ed36146488ec37..12f44a48752e0e0d4e0d722c74b7513561334733 100644
(file)
--- a/
ccan/opt/usage.c
+++ b/
ccan/opt/usage.c
@@
-110,7
+110,7
@@
static char *add_desc(char *base, size_t *len, size_t *max,
base = add_str(base, len, max, opt->names);
off = strlen(opt->names);
- if (
opt->type == OPT_HASARG
+ if (
(opt->type & OPT_HASARG)
&& !strchr(opt->names, ' ')
&& !strchr(opt->names, '=')) {
base = add_str(base, len, max, " <arg>");