]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool: remove dead code
authorPatrick Monnerat <patrick@monnerat.net>
Fri, 23 Sep 2022 09:51:06 +0000 (11:51 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Sep 2022 11:55:52 +0000 (13:55 +0200)
Add a debug assertion to verify protocols included/excluded in a set
are always tokenized.

Follow-up to commit 677266c.

Closes #9576

src/tool_operate.c
src/tool_paramhlp.c

index 1d86927e159e147a3a729d57bc6ce0c52a6b6236..5868188301f5ce3807a3eaa338e725c6ebc24607 100644 (file)
@@ -1249,14 +1249,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
         if(result)
           break;
 
-        /* here */
         use_proto = url_proto(per->this_url);
-#if 0
-        if(!use_proto) {
-          warnf(global, "URL is '%s' but no support for the scheme\n",
-                per->this_url);
-        }
-#endif
 
         if(!config->tcp_nodelay)
           my_setopt(curl, CURLOPT_TCP_NODELAY, 0L);
index a8537eacd4c96ddda7196dda5b8c91dfa98d5785..3a67e7ce130584374543d3b73dc3bf3d3e5cf99f 100644 (file)
@@ -271,6 +271,8 @@ static size_t protoset_index(const char * const *protoset, const char *proto)
 {
   const char * const *p = protoset;
 
+  DEBUGASSERT(proto == proto_token(proto));     /* Ensure it is tokenized. */
+
   for(; *p; p++)
     if(proto == *p)
       break;