diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-12-07 10:22:38 +0100 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-12-08 22:04:30 +1100 |
commit | 35f45ae0078f9972a4ea887f59670a7e8f346f94 (patch) | |
tree | 74ec639bb81c284888daca48c920b34b94eae376 /providers/implementations | |
parent | 24dd9fc4c6c8341cd7f81d5e31513e59fcb934cf (diff) |
rename MIN() macro
MIN is a rather generic name and results in a name clash when trying to
port tianocore over to openssl 3.0. Use the usual ossl prefix and
rename the macro to ossl_min() to solve this.
CLA: trivial
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17219)
(cherry picked from commit f4f77c2d9756cee12875397276799a93f057d412)
Diffstat (limited to 'providers/implementations')
-rw-r--r-- | providers/implementations/kdfs/kbkdf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c index 01f7f0d4fd..5f30b037d9 100644 --- a/providers/implementations/kdfs/kbkdf.c +++ b/providers/implementations/kdfs/kbkdf.c @@ -46,7 +46,7 @@ #include "e_os.h" -#define MIN(a, b) ((a) < (b)) ? (a) : (b) +#define ossl_min(a, b) ((a) < (b)) ? (a) : (b) typedef enum { COUNTER = 0, @@ -195,7 +195,7 @@ static int derive(EVP_MAC_CTX *ctx_init, kbkdf_mode mode, unsigned char *iv, goto done; to_write = ko_len - written; - memcpy(ko + written, k_i, MIN(to_write, h)); + memcpy(ko + written, k_i, ossl_min(to_write, h)); written += h; k_i_len = h; |