out:
*done = (result == CURLE_OK) && tunnel_is_established(cf->ctx);
- if (*done) {
+ if(*done) {
cf->connected = TRUE;
tunnel_free(cf, data);
}
/* remove from sub-chain and destroy */
DEBUGASSERT(cf);
- while (*pprev) {
- if (*pprev == cf) {
+ while(*pprev) {
+ if(*pprev == cf) {
*pprev = discard->next;
discard->next = NULL;
found = TRUE;
baller->result = Curl_conn_cf_connect(baller->cf, data, 0, connected);
if(!baller->result) {
- if (*connected) {
+ if(*connected) {
baller->connected = TRUE;
baller->is_done = TRUE;
}
size_t dirAlloc = 0;
const char *str = rawPath;
for(; *str != 0; ++str)
- if (*str == '/')
+ if(*str == '/')
++dirAlloc;
if(dirAlloc) {
p++;
if(*p == ';')
p++;
- } while (*p);
+ } while(*p);
if(!gotma)
/* max-age is mandatory */
}
- if (*content_sha256_header) {
+ if(*content_sha256_header) {
tmp_head = curl_slist_append(head, content_sha256_header);
if(!tmp_head)
goto fail;
/* out of allowed range */
return 1;
- switch (*fmt) {
+ switch(*fmt) {
case 'S':
flags |= FLAGS_ALT;
/* FALLTHROUGH */
parts[n] = l;
c = endp;
- switch (*c) {
+ switch(*c) {
case '.' :
if(n == 3)
return HOST_BAD;
for(;;) {
*err = bearssl_run_until(cf, data, BR_SSL_SENDAPP);
- if (*err != CURLE_OK)
+ if(*err)
return -1;
app = br_ssl_engine_sendapp_buf(&backend->ctx.eng, &applen);
if(!app) {
}
/* Find last position of a cipher in the ciphers string */
cipher_end = cipher_start;
- while (*cipher_end != '\0' && !is_separator(*cipher_end)) {
+ while(*cipher_end != '\0' && !is_separator(*cipher_end)) {
++cipher_end;
}
my $nostr = nostrings($l);
# check spaces after for/if/while/function call
- if($nostr =~ /^(.*)(for|if|while| ([a-zA-Z0-9_]+)) \((.)/) {
+ if($nostr =~ /^(.*)(for|if|while|switch| ([a-zA-Z0-9_]+)) \((.)/) {
+ my ($leading, $word, $extra, $first)=($1,$2,$3,$4);
if($1 =~ / *\#/) {
# this is a #if, treat it differently
}
elsif(defined $3 && $3 eq "case") {
# case must have a space
}
- elsif($4 eq "*") {
- # (* beginning makes the space OK!
+ elsif(($first eq "*") && ($word !~ /(for|if|while|switch)/)) {
+ # A "(*" beginning makes the space OK because it wants to
+ # allow funcion pointer declared
}
elsif($1 =~ / *typedef/) {
# typedefs can use space-paren
}
else {
- checkwarn("SPACEBEFOREPAREN", $line, length($1)+length($2), $file, $l,
- "$2 with space");
+ checkwarn("SPACEBEFOREPAREN", $line, length($leading)+length($word), $file, $l,
+ "$word with space");
}
}
# check for '== NULL' in if/while conditions but not if the thing on
/* Process token modifiers */
while(!ISALNUM(*token)) { /* may be NULL if token is all modifiers */
- switch (*token++) {
+ switch(*token++) {
case '=':
action = set;
break;
pat->globindex = globindex;
while(!done) {
- switch (*pattern) {
+ switch(*pattern) {
case '\0': /* URL ended while set was still open */
return GLOBERROR("unmatched brace", opos, CURLE_URL_MALFORMAT);
res = glob_fixed(glob, glob->glob_buffer, sublen);
}
else {
- switch (*pattern) {
+ switch(*pattern) {
case '\0': /* done */
break;
fputs("\\t", stream);
break;
default:
- if (*i < 32) {
+ if(*i < 32) {
fprintf(stream, "u%04x", *i);
}
else {