]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_aws_sigv4: remove typecasts from HMAC_SHA256 macro
authorKvarec Lezki <cuarzo@ya.ru>
Thu, 2 Feb 2023 11:56:01 +0000 (16:56 +0500)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 3 Feb 2023 09:07:28 +0000 (10:07 +0100)
V220: Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize.

https://pvs-studio.com/en/docs/warnings/v220/

Closes #10400

lib/http_aws_sigv4.c

index 63dc189133bbe87fe032cc12716ba23d2bd18d87..f8ce1695e833902eabf423869c4e887d6dc1d182 100644 (file)
@@ -48,9 +48,9 @@
   do {                                      \
     ret = Curl_hmacit(Curl_HMAC_SHA256,     \
                       (unsigned char *)k,   \
-                      (unsigned int)kl,     \
+                      kl,                   \
                       (unsigned char *)d,   \
-                      (unsigned int)dl, o); \
+                      dl, o);               \
     if(ret) {                               \
       goto fail;                            \
     }                                       \