Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 89538a973119f1bf976b3a6df157ea940cf32eb5 Mon Sep 17 00:00:00 2001 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 5 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 6 | EVP_MD_CTX_init() |
| 7 | |
| 8 | EVP_MD_CTX_init() API returns void, it fixes errors with new compilers |
| 9 | |
| 10 | snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression |
| 11 | |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 13 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | --- |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 15 | snmplib/keytools.c | 3 +-- |
| 16 | 1 file changed, 1 insertion(+), 2 deletions(-) |
| 17 | |
| 18 | diff --git a/snmplib/keytools.c b/snmplib/keytools.c |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 19 | index 2cf0240..50fd3ea 100644 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | --- a/snmplib/keytools.c |
| 21 | +++ b/snmplib/keytools.c |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 22 | @@ -186,8 +186,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 30 | if (!EVP_DigestInit(ctx, hashfn)) |
| 31 | return SNMPERR_GENERR; |