]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/usage.c
opt: print usage correctly for early args.
[ccan] / ccan / opt / usage.c
index 353d59bc48542d8423ddc3c437ed36146488ec37..12f44a48752e0e0d4e0d722c74b7513561334733 100644 (file)
@@ -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>");