From 983aa97f941c781c75d7c98d8800eb6fd95d39de Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 4 Jan 2018 12:15:15 -0800 Subject: [PATCH] DRBG Warning Fix 1. Some compilers will warn on unused constants. Removed the constant DRBG_ERROR which is unused and causing warnings on a particular build. 2. Renumbered the remaining internal return codes. --- wolfcrypt/src/random.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 677d866a1..44b1796d5 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -162,10 +162,9 @@ int wc_RNG_GenerateByte(WC_RNG* rng, byte* b) /* Internal return codes */ #define DRBG_SUCCESS 0 -#define DRBG_ERROR 1 -#define DRBG_FAILURE 2 -#define DRBG_NEED_RESEED 3 -#define DRBG_CONT_FAILURE 4 +#define DRBG_FAILURE 1 +#define DRBG_NEED_RESEED 2 +#define DRBG_CONT_FAILURE 3 /* RNG health states */ #define DRBG_NOT_INIT 0