X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Fparse.c;h=7b7c02c5936f5af60d7b702979473fdf2dbd1820;hp=228808dd4a6707b73e37173575ca25e36e62a1ac;hb=8fc7a90a8db345c4276419d11f8731afc63f65f5;hpb=9056c31b46452c92c7dd9c276664f514720a84c6 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) {