res = getparameter(flag, nextarg, &passarg, config);
if(res) {
- const char *reason = param2text(res);
- if(res != PARAM_HELP_REQUESTED)
+ int retval = CURLE_OK;
+ if(res != PARAM_HELP_REQUESTED) {
+ const char *reason = param2text(res);
helpf(config->errors, "option %s: %s\n", origopt, reason);
+ retval = CURLE_FAILED_INIT;
+ }
clean_getout(config);
- return CURLE_FAILED_INIT;
+ return retval;
}
if(passarg) /* we're supposed to skip this */