And fix some code previously doing this.
Closes #19375
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;
'DOBRACE' => 'A single space between do and open brace',
'EMPTYLINEBRACE' => 'Empty line before the open brace',
'EQUALSNOSPACE' => 'equals sign without following space',
+ 'EQUALSPACE' => 'equals sign with too many spaces following',
'EQUALSNULL' => 'if/while comparison with == NULL',
'ERRNOVAR' => 'use of bare errno define',
'EXCLAMATIONSPACE' => 'Whitespace after exclamation mark in expression',
$line, length($1)+1, $file, $ol,
"no space before equals sign");
}
+ # check for equals sign with more than one space after it
+ elsif($l =~ /(.*)[a-z0-9] \= /i) {
+ checkwarn("EQUALSPACE",
+ $line, length($1)+3, $file, $ol,
+ "more than one space after equals sign");
+ }
# check for plus signs without spaces next to it
if($nostr =~ /(.*)[^+]\+[a-z0-9]/i) {
i++; ss_test[i].num = -0x0050 -1; ss_test[i].expected = "-81";
i++; ss_test[i].num = -0x0005 -1; ss_test[i].expected = "-6";
- i++; ss_test[i].num = 0x0000 -1; ss_test[i].expected = "-1";
+ i++; ss_test[i].num = 0x0000 -1; ss_test[i].expected = "-1";
num_sshort_tests = i;
i++; si_test[i].num = -0x0050 -1; si_test[i].expected = "-81";
i++; si_test[i].num = -0x0005 -1; si_test[i].expected = "-6";
- i++; si_test[i].num = 0x0000 -1; si_test[i].expected = "-1";
+ i++; si_test[i].num = 0x0000 -1; si_test[i].expected = "-1";
num_sint_tests = i;
i++; si_test[i].num = -0x00000050 -1; si_test[i].expected = "-81";
i++; si_test[i].num = -0x00000005 -1; si_test[i].expected = "-6";
- i++; si_test[i].num = 0x00000000 -1; si_test[i].expected = "-1";
+ i++; si_test[i].num = 0x00000000 -1; si_test[i].expected = "-1";
num_sint_tests = i;
i++; si_test[i].num = -0x0000000000000070 -1; si_test[i].expected = "-113";
i++; si_test[i].num = -0x0000000000000007 -1; si_test[i].expected = "-8";
- i++; si_test[i].num = 0x0000000000000000 -1; si_test[i].expected = "-1";
+ i++; si_test[i].num = 0x0000000000000000 -1; si_test[i].expected = "-1";
num_sint_tests = i;
i++; sl_test[i].num = -0x0050L -1L; sl_test[i].expected = "-81";
i++; sl_test[i].num = -0x0005L -1L; sl_test[i].expected = "-6";
- i++; sl_test[i].num = 0x0000L -1L; sl_test[i].expected = "-1";
+ i++; sl_test[i].num = 0x0000L -1L; sl_test[i].expected = "-1";
num_slong_tests = i;
i++; sl_test[i].num = -0x00000050L -1L; sl_test[i].expected = "-81";
i++; sl_test[i].num = -0x00000005L -1L; sl_test[i].expected = "-6";
- i++; sl_test[i].num = 0x00000000L -1L; sl_test[i].expected = "-1";
+ i++; sl_test[i].num = 0x00000000L -1L; sl_test[i].expected = "-1";
num_slong_tests = i;
i++; sl_test[i].num = -0x0000000000000070L -1L; sl_test[i].expected = "-113";
i++; sl_test[i].num = -0x0000000000000007L -1L; sl_test[i].expected = "-8";
- i++; sl_test[i].num = 0x0000000000000000L -1L; sl_test[i].expected = "-1";
+ i++; sl_test[i].num = 0x0000000000000000L -1L; sl_test[i].expected = "-1";
num_slong_tests = i;
i++; co_test[i].num = -0x0000000000000070 -1; co_test[i].expected = "-113";
i++; co_test[i].num = -0x0000000000000007 -1; co_test[i].expected = "-8";
- i++; co_test[i].num = 0x0000000000000000 -1; co_test[i].expected = "-1";
+ i++; co_test[i].num = 0x0000000000000000 -1; co_test[i].expected = "-1";
num_cofft_tests = i;
{
newline = 0; /* init crlf flag */
prevchar = -1;
- bfs[0].counter = BF_ALLOC; /* pass out the first buffer */
+ bfs[0].counter = BF_ALLOC; /* pass out the first buffer */
current = 0;
bfs[1].counter = BF_FREE;
nextone = x; /* ahead or behind? */
timediff_t timeout;
NOW(run[i].now_s, run[i].now_us);
TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms);
- timeout = Curl_timeleft(easy, &now, run[i].connecting);
+ timeout = Curl_timeleft(easy, &now, run[i].connecting);
if(timeout != run[i].result)
fail(run[i].comment);
}