aboutsummaryrefslogtreecommitdiff
path: root/src/tool_main.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-02-22 18:57:02 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-02-22 18:57:02 +0000
commitb914e7ed02d7e69cfcc47e8a3f47eaaaf111b4cb (patch)
tree52c8fd0ec865d57fa1744ab6ea683cbdc48f4f64 /src/tool_main.c
parentee23d13a79b185f117580773be9c5171097f8311 (diff)
tool_operate: Start to use CURLcode rather than int for return codes
To help assist with the detection of incorrect return codes, as per commits ee23d13a79, 33b8960dc8 and aba98991a5, updated the operate based functions to return CURLcode error codes.
Diffstat (limited to 'src/tool_main.c')
-rw-r--r--src/tool_main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tool_main.c b/src/tool_main.c
index ecf9f9f38..dabd5c95c 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -161,7 +161,7 @@ static void main_free(void)
*/
int main(int argc, char *argv[])
{
- int res;
+ CURLcode result = CURLE_OK;
struct Configurable *config;
main_checkfds();
@@ -182,10 +182,10 @@ int main(int argc, char *argv[])
/* Initialize the curl library - do not call any libcurl functions before
this point */
- res = main_init(config);
- if(!res) {
+ result = main_init(config);
+ if(!result) {
/* Start our curl operation */
- res = operate(config, argc, argv);
+ result = operate(config, argc, argv);
/* Perform the main cleanup */
main_free();
@@ -202,7 +202,7 @@ int main(int argc, char *argv[])
}
else {
helpf(stderr, "error initializing curl\n");
- res = CURLE_FAILED_INIT;
+ result = CURLE_FAILED_INIT;
}
#ifdef __NOVELL_LIBC__
@@ -213,7 +213,7 @@ int main(int argc, char *argv[])
#ifdef __VMS
vms_special_exit(res, vms_show);
#else
- return res;
+ return (int)result;
#endif
}