tool: Do not output libcurl source for the information only parameters
Ensure a source file isn't generated for the following informational command line parameters when --libcurl is specified: --help, --manual, --version and --engine list As the output would only include a fairly empty looking main() function and a call to curl_easy_init() and curl_easy_cleanup() when performed with --engine list.
This commit is contained in:
parent
68920b6c11
commit
7fef4016de
@ -1839,6 +1839,9 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
|
|||||||
#ifndef CURL_DISABLE_LIBCURL_OPTION
|
#ifndef CURL_DISABLE_LIBCURL_OPTION
|
||||||
/* Cleanup the libcurl source output */
|
/* Cleanup the libcurl source output */
|
||||||
easysrc_cleanup();
|
easysrc_cleanup();
|
||||||
|
|
||||||
|
/* Dump the libcurl code if previously enabled */
|
||||||
|
dumpeasysrc(config);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1846,12 +1849,5 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CURL_DISABLE_LIBCURL_OPTION
|
|
||||||
/* Dump the libcurl code if previously enabled.
|
|
||||||
NOTE: that this function relies on config->errors amongst other things
|
|
||||||
so not everything can be closed and cleaned before this is called */
|
|
||||||
dumpeasysrc(config);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user