projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4111d5
)
Use headerNextTag() for header format iteration
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 22 Sep 2010 11:28:32 +0000
(14:28 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 22 Sep 2010 11:28:32 +0000
(14:28 +0300)
- Doesn't really win anything performance-wise but makes the code nicer
lib/headerfmt.c
patch
|
blob
|
history
diff --git
a/lib/headerfmt.c
b/lib/headerfmt.c
index
e25f13a
..
33c7296
100644
(file)
--- 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);
}
}