]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
providers/implementations/kdfs/argon2.c: Don't use UINT64_C
authorRichard Levitte <levitte@openssl.org>
Mon, 20 Mar 2023 07:09:40 +0000 (08:09 +0100)
committerPauli <pauli@openssl.org>
Tue, 21 Mar 2023 08:05:25 +0000 (19:05 +1100)
With less than C99 compilers, this macro isn't guaranteed to exist, and
the value passed to it is 32 bits, so explicitly ending it with 'UL' is
correct in all cases.  We simply leave it to the compiler to extend it
appropriately for uint64_t.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20547)

providers/implementations/kdfs/argon2.c

index 768dcfe1bff66cb1d7e02435359adbb8f6f1967f..60c8fff1b87bcb054dfa217967f72d9b5b9ca408 100644 (file)
@@ -307,7 +307,7 @@ static ossl_inline uint64_t rotr64(const uint64_t w, const unsigned int c)
 
 static ossl_inline uint64_t mul_lower(uint64_t x, uint64_t y)
 {
-    const uint64_t m = UINT64_C(0xFFFFFFFF);
+    const uint64_t m = 0xFFFFFFFFUL;
     return (x & m) * (y & m);
 }