checksrc.pl: detect assign followed by more than one space

And fix some code previously doing this.

Closes #19375
This commit is contained in:
Daniel Stenberg 2025-11-05 14:40:18 +01:00
parent c12a1fdd0e
commit 6d7e924e80
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 20 additions and 13 deletions

View file

@ -99,9 +99,9 @@ static CURLcode tunnel_stream_init(struct Curl_cfilter *cf,
if(result)
return result;
ts->authority = /* host:port with IPv6 support */
curl_maprintf("%s%s%s:%d", ipv6_ip ? "[":"", hostname,
ipv6_ip ? "]" : "", port);
/* host:port with IPv6 support */
ts->authority = curl_maprintf("%s%s%s:%d", ipv6_ip ? "[":"", hostname,
ipv6_ip ? "]" : "", port);
if(!ts->authority)
return CURLE_OUT_OF_MEMORY;