checksrc: make sure sizeof() is used *with* parentheses

... and unify the source code to adhere.

Closes #2563
This commit is contained in:
Daniel Stenberg 2018-05-11 23:40:58 +02:00
parent f3d836b736
commit cb529b713f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
25 changed files with 77 additions and 64 deletions

View file

@ -345,7 +345,7 @@ const char *Curl_http2_strerror(uint32_t err)
"INADEQUATE_SECURITY", /* 0xC */
"HTTP_1_1_REQUIRED" /* 0xD */
};
return (err < sizeof str / sizeof str[0]) ? str[err] : "unknown";
return (err < sizeof(str) / sizeof(str[0])) ? str[err] : "unknown";
#else
return nghttp2_http2_strerror(err);
#endif