]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/parse.c
ccan: allow user to set some bits in opt_table.type.
[ccan] / ccan / opt / parse.c
index 56c2a35ba4a1532ce2967d062e32ed8980591d32..b932bf333571620d0e19edca1b10a82cc70d8397 100644 (file)
@@ -140,7 +140,7 @@ int parse_one(int *argc, char *argv[], enum opt_type is_early, unsigned *offset,
                len = 2;
        }
 
-       if ((ot->type & ~OPT_EARLY) == OPT_NOARG) {
+       if (ot->type & OPT_NOARG) {
                if (optarg)
                        return parse_err(errlog, argv[0], o, len,
                                         "doesn't allow an argument");