X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Fparse.c;fp=ccan%2Fopt%2Fparse.c;h=7b7c02c5936f5af60d7b702979473fdf2dbd1820;hp=228808dd4a6707b73e37173575ca25e36e62a1ac;hb=e34192d580958aaffff3754a4e2bf1eccbb489f8;hpb=66711021849dd07cd29383c9ed40ab4b9f3d1e07 diff --git a/ccan/opt/parse.c b/ccan/opt/parse.c index 228808dd..7b7c02c5 100644 --- a/ccan/opt/parse.c +++ b/ccan/opt/parse.c @@ -94,7 +94,7 @@ int parse_one(int *argc, char *argv[], unsigned *offset, if (optarg) return parse_err(errlog, argv[0], o, len, "doesn't allow an argument"); - problem = opt_table[i].cb(opt_table[i].arg); + problem = opt_table[i].cb(opt_table[i].u.arg); } else { if (!optarg) { /* Swallow any short options as optarg, eg -afile */ @@ -107,7 +107,7 @@ int parse_one(int *argc, char *argv[], unsigned *offset, if (!optarg) return parse_err(errlog, argv[0], o, len, "requires an argument"); - problem = opt_table[i].cb_arg(optarg, opt_table[i].arg); + problem = opt_table[i].cb_arg(optarg, opt_table[i].u.arg); } if (problem) {