Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From d3027a227bc0f603a5b650d01f97ee1dec515be5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 18 Sep 2015 00:28:45 -0400 |
| 4 | Subject: [PATCH] snmplib/keytools.c: Don't check for return from |
| 5 | EVP_MD_CTX_init() |
| 6 | |
| 7 | EVP_MD_CTX_init() API returns void, it fixes errors with new compilers |
| 8 | |
| 9 | snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | Upstream-Status: Submitted [https://sourceforge.net/p/net-snmp/patches/1317/] |
| 14 | snmplib/keytools.c | 3 +-- |
| 15 | 1 file changed, 1 insertion(+), 2 deletions(-) |
| 16 | |
| 17 | diff --git a/snmplib/keytools.c b/snmplib/keytools.c |
| 18 | index 0ccb3a6..880fc14 100644 |
| 19 | --- a/snmplib/keytools.c |
| 20 | +++ b/snmplib/keytools.c |
| 21 | @@ -153,8 +153,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, |
| 22 | ctx = EVP_MD_CTX_create(); |
| 23 | #else |
| 24 | ctx = malloc(sizeof(*ctx)); |
| 25 | - if (!EVP_MD_CTX_init(ctx)) |
| 26 | - return SNMPERR_GENERR; |
| 27 | + EVP_MD_CTX_init(ctx); |
| 28 | #endif |
| 29 | #ifndef NETSNMP_DISABLE_MD5 |
| 30 | if (ISTRANSFORM(hashtype, HMACMD5Auth)) { |
| 31 | -- |
| 32 | 2.5.2 |
| 33 | |