blob: 6450c1cc929f19a48eaa05add77ba28a7d721ba8 [file] [log] [blame]
From f4e1acd4f509dd26cf88da872bd5adcf884f4a5f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 18 Sep 2015 00:28:45 -0400
Subject: [PATCH] snmplib/keytools.c: Don't check for return from
EVP_MD_CTX_init()
EVP_MD_CTX_init() API returns void, it fixes errors with new compilers
snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---
Upstream-Status: Pending
snmplib/keytools.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/snmplib/keytools.c b/snmplib/keytools.c
index 14a452a..fb1694b 100644
--- a/snmplib/keytools.c
+++ b/snmplib/keytools.c
@@ -183,10 +183,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
ctx = EVP_MD_CTX_create();
#else
ctx = malloc(sizeof(*ctx));
- if (!EVP_MD_CTX_init(ctx)) {
- rval = SNMPERR_GENERR;
- goto generate_Ku_quit;
- }
+ EVP_MD_CTX_init(ctx);
#endif
if (!EVP_DigestInit(ctx, hashfn)) {
rval = SNMPERR_GENERR;