mirror of
https://github.com/curl/curl.git
synced 2025-09-17 09:32:48 +03:00
tool: remove dead code
Add a debug assertion to verify protocols included/excluded in a set
are always tokenized.
Follow-up to commit 677266c
.
Closes #9576
This commit is contained in:
parent
91e06e687a
commit
ce30d518de
|
@ -1249,14 +1249,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
||||||
if(result)
|
if(result)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* here */
|
|
||||||
use_proto = url_proto(per->this_url);
|
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)
|
if(!config->tcp_nodelay)
|
||||||
my_setopt(curl, CURLOPT_TCP_NODELAY, 0L);
|
my_setopt(curl, CURLOPT_TCP_NODELAY, 0L);
|
||||||
|
|
|
@ -271,6 +271,8 @@ static size_t protoset_index(const char * const *protoset, const char *proto)
|
||||||
{
|
{
|
||||||
const char * const *p = protoset;
|
const char * const *p = protoset;
|
||||||
|
|
||||||
|
DEBUGASSERT(proto == proto_token(proto)); /* Ensure it is tokenized. */
|
||||||
|
|
||||||
for(; *p; p++)
|
for(; *p; p++)
|
||||||
if(proto == *p)
|
if(proto == *p)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user