summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-21 13:11:56 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-21 13:11:56 +0300
commit5eda18510905ebeb09f1126195d6bb563bd2483a (patch)
treeb181f7b86b040a0026b88b4409fbecc4184c8f2c
parentcb13c4398609bb8e9d7a6750075d79d1662a26e1 (diff)
downloadrpm-5eda18510905ebeb09f1126195d6bb563bd2483a.tar.gz
rpm-5eda18510905ebeb09f1126195d6bb563bd2483a.tar.bz2
rpm-5eda18510905ebeb09f1126195d6bb563bd2483a.zip
Use RPMTAG_NOT_FOUND instead of for "invalid tag" value
-rw-r--r--lib/headerfmt.c2
-rw-r--r--lib/rpmds.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c
index 7e86b970d..828c6e49e 100644
--- a/lib/headerfmt.c
+++ b/lib/headerfmt.c
@@ -224,7 +224,7 @@ static int findTag(headerSprintfArgs hsa, sprintfToken token, const char * name)
? &token->u.cond.tag : &token->u.tag);
stag->fmt = NULL;
- stag->tag = -1;
+ stag->tag = RPMTAG_NOT_FOUND;
if (rstreq(tagname, "*")) {
stag->tag = -2;
diff --git a/lib/rpmds.c b/lib/rpmds.c
index c355300a6..adc52ecb9 100644
--- a/lib/rpmds.c
+++ b/lib/rpmds.c
@@ -326,7 +326,7 @@ rpmsenseFlags rpmdsFlags(const rpmds ds)
rpmTag rpmdsTagN(const rpmds ds)
{
- rpmTag tagN = 0;
+ rpmTag tagN = RPMTAG_NOT_FOUND;
if (ds != NULL)
tagN = ds->tagN;