diff options
author | jbj <devnull@localhost> | 2001-06-05 22:01:13 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-06-05 22:01:13 +0000 |
commit | c635bbf0aedc73aa138078ffe1c761507de9d91a (patch) | |
tree | 3bf8088633f8cb78c2dfecf257d0f6231cd44539 /lib | |
parent | 8959a0de7070e4a3886ede3f1703ac6098b5a6eb (diff) | |
download | rpm-c635bbf0aedc73aa138078ffe1c761507de9d91a.tar.gz rpm-c635bbf0aedc73aa138078ffe1c761507de9d91a.tar.bz2 rpm-c635bbf0aedc73aa138078ffe1c761507de9d91a.zip |
fix: increment pointer in funky header ext while loop.
CVS patchset: 4841
CVS date: 2001/06/05 22:01:13
Diffstat (limited to 'lib')
-rw-r--r-- | lib/header.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/header.c b/lib/header.c index 656cbc938..55132822a 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1989,9 +1989,8 @@ static void findTag(char * name, const struct headerTagTableEntry * tags, /* Search extensions first to permit overriding header tags. */ ext = extensions; while (ext->type != HEADER_EXT_LAST) { - if (ext->name == NULL) /* XXX programmer error. */ - continue; - if (ext->type == HEADER_EXT_TAG && !xstrcasecmp(ext->name, tagname)) + if (ext->name != NULL && ext->type == HEADER_EXT_TAG + && !xstrcasecmp(ext->name, tagname)) break; if (ext->type == HEADER_EXT_MORE) @@ -2464,9 +2463,8 @@ static char * formatValue(struct sprintfTag * tag, Header h, if (tag->type) { ext = extensions; while (ext->type != HEADER_EXT_LAST) { - if (ext->name == NULL) /* XXX programmer error. */ - continue; - if (ext->type == HEADER_EXT_FORMAT && !strcmp(ext->name, tag->type)) + if (ext->name != NULL && ext->type == HEADER_EXT_FORMAT + && !strcmp(ext->name, tag->type)) { tagtype = ext->u.formatFunction; break; |