diff options
author | Cerul Alain <ae@metaeducation.com> | 2020-07-13 00:34:42 -0400 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2020-08-31 11:52:07 +0300 |
commit | 78405aeb546f2dd8e9e670ad0d565a1f421ceb2c (patch) | |
tree | 45dd41dc414ea3e2730752a8f330fad891e96d50 | |
parent | baee9e8d9574c59eb7c7357786a392b1a5d37ffd (diff) | |
download | rpm-78405aeb546f2dd8e9e670ad0d565a1f421ceb2c.tar.gz |
Remove compare of global array tagsByName to NULL
A 2016 change (57a96d2486c26142ebb168a1f00b0374d35bf044) apparently
changed tagsByName from dynamic allocation to being static, so that
Valgrind would not complain about lost memory. The definition is:
static headerTagTableEntry tagsByName[TABLESIZE];
But a comparison was left of `tagsByName == NULL` in lib/tagname.c
and compiling with clang gives a warning, saying it is never NULL.
(cherry picked from commit 92a78e6acf3f056faccebb25a9d310ee96f8015d)
-rw-r--r-- | lib/tagname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tagname.c b/lib/tagname.c index 68b252991..4efd847eb 100644 --- a/lib/tagname.c +++ b/lib/tagname.c @@ -234,7 +234,7 @@ int rpmTagGetNames(rpmtd tagnames, int fullname) pthread_once(&tagsLoaded, loadTags); - if (tagnames == NULL || tagsByName == NULL) + if (tagnames == NULL) return 0; rpmtdReset(tagnames); |