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:
35c0252
)
Convert headerGetColor() to use per-datatype iterator
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 21 May 2008 11:51:25 +0000
(14:51 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 21 May 2008 11:51:25 +0000
(14:51 +0300)
lib/hdrNVR.c
patch
|
blob
|
history
diff --git
a/lib/hdrNVR.c
b/lib/hdrNVR.c
index
a8c2f3f
..
68ab7e2
100644
(file)
--- a/
lib/hdrNVR.c
+++ b/
lib/hdrNVR.c
@@
-104,12
+104,11
@@
char * headerGetEVR(Header h, const char ** np)
rpm_color_t headerGetColor(Header h)
{
- rpm_color_t hcolor = 0;
+ rpm_color_t hcolor = 0
, *fcolor
;
struct rpmtd_s fcolors;
headerGet(h, RPMTAG_FILECOLORS, &fcolors, HEADERGET_MINMEM);
- while (rpmtdNext(&fcolors) >= 0) {
- rpm_color_t *fcolor = rpmtdGetUint32(&fcolors);
+ while ((fcolor = rpmtdNextUint32(&fcolors)) != NULL) {
hcolor |= *fcolor;
}
hcolor &= 0x0f;