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

@ -63,7 +63,7 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string,
if(!string || (inlength < 0))
return NULL;
length = (inlength?(size_t)inlength:strlen(string));
length = (inlength ? (size_t)inlength : strlen(string));
if(!length)
return strdup("");
@ -82,7 +82,7 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string,
/* encode it */
const char hex[] = "0123456789ABCDEF";
char out[3]={'%'};
out[1] = hex[in>>4];
out[1] = hex[in >> 4];
out[2] = hex[in & 0xf];
if(Curl_dyn_addn(&d, out, 3))
return NULL;
@ -223,7 +223,7 @@ void Curl_hexencode(const unsigned char *src, size_t len, /* input length */
while(len-- && (olen >= 3)) {
/* clang-tidy warns on this line without this comment: */
/* NOLINTNEXTLINE(clang-analyzer-core.UndefinedBinaryOperatorResult) */
*out++ = (unsigned char)hex[(*src & 0xF0)>>4];
*out++ = (unsigned char)hex[(*src & 0xF0) >> 4];
*out++ = (unsigned char)hex[*src & 0x0F];
++src;
olen -= 2;