From 7e56c6355bea552d89e8d5d0a317763a8cee4a4f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 13 Dec 2007 19:32:37 +0200 Subject: Use rpm_tag_t everywhere for rpm (header) tag type - typedef'ed as int32_t for now, negative values used in some places for error cases - easy to grep, easy to change... - add RPMTAG_NOT_FOUND define, used in place of -1 "magic", --- tools/rpminject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/rpminject.c b/tools/rpminject.c index de4499e53..5b823e8a2 100644 --- a/tools/rpminject.c +++ b/tools/rpminject.c @@ -497,8 +497,7 @@ main(int argc, char *argv[]) ncmds++; } c->tagval = rpmTagGetValue(optArg); - if (!((c->tagval >= RPMTAG_NAME && c->tagval < RPMTAG_FIRSTFREE_TAG) - || c->tagval >= RPMTAG_EXTERNAL_TAG)) + if (c->tagval == RPMTAG_NOT_FOUND) errx(EXIT_FAILURE, _("unknown rpm tag \"--tag %s\""), optArg); c->tag = xstrdup(optArg); break; -- cgit v1.2.3