projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bf224c
)
Use safer per-datatype iterator instead of generic one
author
Panu Matilainen
<pmatilai@redhat.com>
Sat, 31 May 2008 10:20:21 +0000
(13:20 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Sat, 31 May 2008 10:20:21 +0000
(13:20 +0300)
build/rpmfc.c
patch
|
blob
|
history
diff --git
a/build/rpmfc.c
b/build/rpmfc.c
index
f99ca2d
..
b62ecff
100644
(file)
--- a/
build/rpmfc.c
+++ b/
build/rpmfc.c
@@
-1632,11
+1632,11
@@
assert(EVR != NULL);
/* Add per-file colors(#files) */
if (rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) {
+ rpm_color_t *fcolor;
assert(ac == rpmtdCount(&td));
assert(rpmtdType(&td) == RPM_INT32_TYPE);
/* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */
- while (rpmtdNext(&td) >= 0) {
- rpm_color_t *fcolor = rpmtdGetUint32(&td);
+ while ((fcolor = rpmtdNextUint32(&td))) {
*fcolor &= 0x0f;
}
headerPut(pkg->header, &td, HEADERPUT_DEFAULT);