richardphibel / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
Blob Blame History Raw
From efd41edd0c9ba848814a5434d986338c1691418e Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 10 Oct 2017 15:20:16 +0300
Subject: [PATCH 09/33] Drop redundant check on hash algo name

The array is already size-validated, me thinks we can safely
assume the array to be populated with non-NULL values.
---
 sign/rpmsignfiles.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sign/rpmsignfiles.c b/sign/rpmsignfiles.c
index 9fe6e6d41..4876f66f2 100644
--- a/sign/rpmsignfiles.c
+++ b/sign/rpmsignfiles.c
@@ -87,10 +87,6 @@ rpmRC rpmSignFiles(Header sigh, Header h, const char *key, char *keypass)
 
     diglen = rpmDigestLength(algo);
     algoname = hash_algo_name[algo];
-    if (!algoname) {
-	rpmlog(RPMLOG_ERR, _("hash_algo_name failed\n"));
-	goto exit;
-    }
 
     headerDel(sigh, RPMTAG_FILESIGNATURELENGTH);
     headerDel(sigh, RPMTAG_FILESIGNATURES);
-- 
2.27.0