Remove redundant strlen()'s on sha1 digest verification

- string comparison notices different length anyway, avoid going
  through the same data twice
This commit is contained in:
Panu Matilainen 2011-04-28 10:31:23 +03:00
parent 60bb36b90c
commit 44ce440509
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ verifySHA1Digest(rpmtd sigtd, DIGEST_CTX sha1ctx, char **msg)
(void) rpmDigestFinal(ctx, (void **)&SHA1, NULL, 1);
if (SHA1 == NULL || strlen(SHA1) != strlen(sig) || !rstreq(SHA1, sig)) {
if (SHA1 == NULL || !rstreq(SHA1, sig)) {
rasprintf(msg, "%s %s Expected(%s) != (%s)\n", title,
rpmSigString(res), sig, SHA1 ? SHA1 : "(nil)");
} else {