malmond / rpms / rpm

Forked from rpms/rpm 4 years ago
Clone

Blame SOURCES/0010-Drop-redundant-check-on-hash-algo-name.patch

657fb1
From 17643af15665beecfc2f37d9eb0832ec4bcc4f59 Mon Sep 17 00:00:00 2001
657fb1
From: Panu Matilainen <pmatilai@redhat.com>
657fb1
Date: Tue, 10 Oct 2017 15:20:16 +0300
657fb1
Subject: [PATCH 10/33] Drop redundant check on hash algo name
657fb1
657fb1
The array is already size-validated, me thinks we can safely
657fb1
assume the array to be populated with non-NULL values.
657fb1
---
657fb1
 sign/rpmsignfiles.c | 4 ----
657fb1
 1 file changed, 4 deletions(-)
657fb1
657fb1
diff --git a/sign/rpmsignfiles.c b/sign/rpmsignfiles.c
657fb1
index 9fe6e6d41..4876f66f2 100644
657fb1
--- a/sign/rpmsignfiles.c
657fb1
+++ b/sign/rpmsignfiles.c
657fb1
@@ -87,10 +87,6 @@ rpmRC rpmSignFiles(Header sigh, Header h, const char *key, char *keypass)
657fb1
 
657fb1
     diglen = rpmDigestLength(algo);
657fb1
     algoname = hash_algo_name[algo];
657fb1
-    if (!algoname) {
657fb1
-	rpmlog(RPMLOG_ERR, _("hash_algo_name failed\n"));
657fb1
-	goto exit;
657fb1
-    }
657fb1
 
657fb1
     headerDel(sigh, RPMTAG_FILESIGNATURELENGTH);
657fb1
     headerDel(sigh, RPMTAG_FILESIGNATURES);
657fb1
-- 
657fb1
2.13.5
657fb1