]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_paramhlp: fix "enumerated type mixed with another type"
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jul 2022 22:26:29 +0000 (00:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Jul 2022 11:39:26 +0000 (13:39 +0200)
Warning by icc

Closes #9179

src/tool_paramhlp.c

index 6f6d7a1c20477b573e6d98552c23c1d49831553b..9306498e2393ac0140c68e4b752eff9fdf152533 100644 (file)
@@ -314,11 +314,11 @@ ParameterError proto2num(struct OperationConfig *config,
   };
 
   if(!str)
-    return 1;
+    return PARAM_OPTION_AMBIGUOUS;
 
   buffer = strdup(str); /* because strtok corrupts it */
   if(!buffer)
-    return 1;
+    return PARAM_NO_MEM;
 
   /* Allow strtok() here since this isn't used threaded */
   /* !checksrc! disable BANNEDFUNC 2 */
@@ -341,7 +341,7 @@ ParameterError proto2num(struct OperationConfig *config,
         break;
       default: /* Includes case of terminating NULL */
         Curl_safefree(buffer);
-        return 1;
+        return PARAM_BAD_USE;
       }
     }