lib/src: white space edits to comply better with code style

... as checksrc now finds and complains about these.

Closes #14921
This commit is contained in:
Daniel Stenberg 2024-09-18 15:29:51 +02:00
parent a57b45c386
commit fbf5d507ce
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
128 changed files with 854 additions and 837 deletions

View file

@ -127,8 +127,8 @@ convert(char *d, size_t dlen, int dccsid,
dccsid = ASCII_CCSID;
if(sccsid == dccsid) {
lslen = slen >= 0? slen: strlen(s) + 1;
i = lslen < dlen? lslen: dlen;
lslen = slen >= 0 ? slen: strlen(s) + 1;
i = lslen < dlen ? lslen: dlen;
if(s != d && i > 0)
memcpy(d, s, i);
@ -170,7 +170,7 @@ static char *dynconvert(int dccsid, const char *s, int slen, int sccsid)
/* Like convert, but the destination is allocated and returned. */
dlen = (size_t) (slen < 0? strlen(s): slen) + 1;
dlen = (size_t) (slen < 0 ? strlen(s): slen) + 1;
dlen *= MAX_CONV_EXPANSION; /* Allow some expansion. */
d = malloc(dlen);
@ -294,7 +294,7 @@ curl_easy_escape_ccsid(CURL *handle, const char *string, int length,
return (char *) NULL;
}
s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid);
s = dynconvert(ASCII_CCSID, string, length ? length: -1, sccsid);
if(!s)
return (char *) NULL;
@ -324,7 +324,7 @@ curl_easy_unescape_ccsid(CURL *handle, const char *string, int length,
return (char *) NULL;
}
s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid);
s = dynconvert(ASCII_CCSID, string, length ? length: -1, sccsid);
if(!s)
return (char *) NULL;
@ -1046,7 +1046,7 @@ Curl_formget_callback_ccsid(void *arg, const char *buf, size_t len)
ret = (*p->append)(p->arg, b, l);
free(b);
return ret == l? len: -1;
return ret == l ? len: -1;
}

View file

@ -640,8 +640,8 @@ Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter,
}
if(status == LDAP_SUCCESS)
status = ldap_search_s(ld, ebase? ebase: "", scope,
efilter? efilter: "(objectclass=*)",
status = ldap_search_s(ld, ebase ? ebase: "", scope,
efilter ? efilter: "(objectclass=*)",
eattrs, attrsonly, res);
if(eattrs) {