From 447e80f96a26ee4e79cdca87daa38e93c655cc2f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 22 Sep 2010 14:28:32 +0300 Subject: [PATCH] Use headerNextTag() for header format iteration - Doesn't really win anything performance-wise but makes the code nicer --- lib/headerfmt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/headerfmt.c b/lib/headerfmt.c index e25f13a..33c7296 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); } } -- 2.7.4