From: Daniel Salzman Date: Sun, 8 Jun 2025 17:02:55 +0000 (+0200) Subject: base32hex: rename MAX_BIN_DATA_LEN to avoid name collision X-Git-Tag: v3.5.0~11^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dce5ef98742b9823fc7d669fc701cf21776f020;p=thirdparty%2Fknot-dns.git base32hex: rename MAX_BIN_DATA_LEN to avoid name collision --- diff --git a/src/contrib/base32hex.c b/src/contrib/base32hex.c index 3bb15b65c2..8a7d7dc43f 100644 --- a/src/contrib/base32hex.c +++ b/src/contrib/base32hex.c @@ -10,7 +10,7 @@ #include /*! \brief Maximal length of binary input to Base32hex encoding. */ -#define MAX_BIN_DATA_LEN ((INT32_MAX / 8) * 5) +#define MAX_B32_BIN_DATA_LEN ((INT32_MAX / 8) * 5) /*! \brief Base32hex padding character. */ static const uint8_t base32hex_pad = '='; @@ -78,7 +78,7 @@ int32_t knot_base32hex_encode(const uint8_t *in, if (in == NULL || out == NULL) { return KNOT_EINVAL; } - if (in_len > MAX_BIN_DATA_LEN || out_len < ((in_len + 4) / 5) * 8) { + if (in_len > MAX_B32_BIN_DATA_LEN || out_len < ((in_len + 4) / 5) * 8) { return KNOT_ERANGE; } @@ -159,7 +159,7 @@ int32_t knot_base32hex_encode_alloc(const uint8_t *in, if (out == NULL) { return KNOT_EINVAL; } - if (in_len > MAX_BIN_DATA_LEN) { + if (in_len > MAX_B32_BIN_DATA_LEN) { return KNOT_ERANGE; }