diff --git a/src/tool_operate.c b/src/tool_operate.c
index 7792bf3613d24e75251e94ff45b2b3edfe70e674..fd2fd6ddd74e5798b0c6b9654a6e4ddb5ecfcb73 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -202,7 +202,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
   CURL *curl = config->easy;
   char *httpgetfields = NULL;
 
-  CURLcode res = 0;
+  CURLcode res = CURLE_OK;
   unsigned long li;
 
   /* Save the values of noprogress and isatty to restore them later on */