Use RPMTAG_NOT_FOUND instead of for "invalid tag" value
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Sep 2010 10:11:56 +0000 (13:11 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Sep 2010 10:11:56 +0000 (13:11 +0300)
lib/headerfmt.c
lib/rpmds.c

index 7e86b97..828c6e4 100644 (file)
@@ -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;
index c355300..adc52ec 100644 (file)
@@ -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;