From: Panu Matilainen Date: Wed, 22 Sep 2010 11:28:32 +0000 (+0300) Subject: Use headerNextTag() for header format iteration X-Git-Tag: rpm-4.9.0-beta1~293 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=447e80f96a26ee4e79cdca87daa38e93c655cc2f;p=platform%2Fupstream%2Frpm.git Use headerNextTag() for header format iteration - Doesn't really win anything performance-wise but makes the code nicer --- 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); } }