malmond / rpms / rpm

Forked from rpms/rpm 4 years ago
Clone
Blob Blame History Raw
From 17643af15665beecfc2f37d9eb0832ec4bcc4f59 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 10 Oct 2017 15:20:16 +0300
Subject: [PATCH 10/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.13.5