summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2017-04-04 15:13:40 +0300
committerPanu Matilainen <pmatilai@redhat.com>2017-04-04 15:13:40 +0300
commitc655de6bc96baee06afd7d4a2876c07d4ddf70cd (patch)
tree0b2eac32011f6b788efa331b9770d16b4c14d448
parent62347e4049a2f2e875501d9b2493ac8c6feb4c75 (diff)
downloadrpm-c655de6bc96baee06afd7d4a2876c07d4ddf70cd.tar.gz
Make test for zero-length digest more obvious
fdigest cannot possibly be NULL here because the surrounding loop would have terminated in that case, and removing that distraction makes the actual test a whole lot more obvious.
-rw-r--r--lib/rpmfi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 427557b78..f30bfa1ca 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -1480,7 +1480,7 @@ static int rpmfilesPopulate(rpmfiles fi, Header h, rpmfiFlags flags)
uint8_t *t = fi->digests = xmalloc(rpmtdCount(&fdigests) * diglen);
while ((fdigest = rpmtdNextString(&fdigests))) {
- if (!(fdigest && *fdigest != '\0')) {
+ if (*fdigest == '\0') {
memset(t, 0, diglen);
t += diglen;
continue;