diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-22 14:28:32 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-22 14:28:32 +0300 |
commit | 447e80f96a26ee4e79cdca87daa38e93c655cc2f (patch) | |
tree | 692a2935f0d4676761bbbcc726bb20c992516ae2 | |
parent | b4111d5123606b5999e932e57578bace37b4924a (diff) | |
download | rpm-447e80f96a26ee4e79cdca87daa38e93c655cc2f.tar.gz rpm-447e80f96a26ee4e79cdca87daa38e93c655cc2f.tar.bz2 rpm-447e80f96a26ee4e79cdca87daa38e93c655cc2f.zip |
Use headerNextTag() for header format iteration
- Doesn't really win anything performance-wise but makes the code nicer
-rw-r--r-- | lib/headerfmt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c index e25f13a3c..33c729641 100644 --- a/lib/headerfmt.c +++ b/lib/headerfmt.c @@ -172,13 +172,9 @@ static sprintfToken hsaNext(headerSprintfArgs hsa) if (hsa->hi == NULL) { hsa->i++; } else { - struct rpmtd_s td; - - /* hmm, cache the data from here too? */ - if (!headerNext(hsa->hi, &td)) + tag->tag = headerNextTag(hsa->hi); + if (tag->tag == RPMTAG_NOT_FOUND) fmt = NULL; - tag->tag = td.tag; - rpmtdFreeData(&td); } } |