blob: 778b40188bbd5c2264350a853bbb6d8a7514be7f [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 89538a973119f1bf976b3a6df157ea940cf32eb5 Mon Sep 17 00:00:00 2001
Patrick Williamsb48b7b42016-08-17 15:04:38 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 18 Sep 2015 00:28:45 -0400
4Subject: [PATCH] snmplib/keytools.c: Don't check for return from
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005
Patrick Williamsb48b7b42016-08-17 15:04:38 -05006 EVP_MD_CTX_init()
7
8EVP_MD_CTX_init() API returns void, it fixes errors with new compilers
9
10snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014---
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015 snmplib/keytools.c | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18diff --git a/snmplib/keytools.c b/snmplib/keytools.c
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019index 2cf0240..50fd3ea 100644
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020--- a/snmplib/keytools.c
21+++ b/snmplib/keytools.c
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022@@ -186,8 +186,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023 ctx = EVP_MD_CTX_create();
24 #else
25 ctx = malloc(sizeof(*ctx));
26- if (!EVP_MD_CTX_init(ctx))
27- return SNMPERR_GENERR;
28+ EVP_MD_CTX_init(ctx);
29 #endif
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030 if (!EVP_DigestInit(ctx, hashfn))
31 return SNMPERR_GENERR;