summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-29 06:29:19 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-03-29 06:29:19 +0300
commit130fddf015bcb4daa0a0cad3d40bcb752bebe7c9 (patch)
tree8ca6e54efd466d56e892a704d14fbfe5ba178d2c /build
parent668f9582917a5b2ffeec7b91f785c6732891b320 (diff)
downloadrpm-130fddf015bcb4daa0a0cad3d40bcb752bebe7c9.tar.gz
rpm-130fddf015bcb4daa0a0cad3d40bcb752bebe7c9.tar.bz2
rpm-130fddf015bcb4daa0a0cad3d40bcb752bebe7c9.zip
Remove redundant assignments
- everything but buildrequires goes to pkg->header, no point having this separately set in each case
Diffstat (limited to 'build')
-rw-r--r--build/parseReqs.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/build/parseReqs.c b/build/parseReqs.c
index b659f76e5..29db65b5e 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -41,7 +41,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
char * N = NULL, * EVR = NULL;
rpmTag nametag = 0;
rpmsenseFlags Flags;
- Header h;
+ Header h = pkg->header; /* everything except buildrequires go here */
rpmRC rc = RPMRC_FAIL; /* assume failure */
switch (tagN) {
@@ -49,45 +49,36 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
case RPMTAG_REQUIREFLAGS:
nametag = RPMTAG_REQUIRENAME;
tagflags |= RPMSENSE_ANY;
- h = pkg->header;
break;
case RPMTAG_PROVIDEFLAGS:
nametag = RPMTAG_PROVIDENAME;
- h = pkg->header;
break;
case RPMTAG_OBSOLETEFLAGS:
nametag = RPMTAG_OBSOLETENAME;
- h = pkg->header;
break;
case RPMTAG_CONFLICTFLAGS:
nametag = RPMTAG_CONFLICTNAME;
- h = pkg->header;
break;
case RPMTAG_PREREQ:
/* XXX map legacy PreReq into Requires(pre,preun) */
nametag = RPMTAG_REQUIRENAME;
tagflags |= (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_PREUN);
- h = pkg->header;
break;
case RPMTAG_TRIGGERPREIN:
nametag = RPMTAG_TRIGGERNAME;
tagflags |= RPMSENSE_TRIGGERPREIN;
- h = pkg->header;
break;
case RPMTAG_TRIGGERIN:
nametag = RPMTAG_TRIGGERNAME;
tagflags |= RPMSENSE_TRIGGERIN;
- h = pkg->header;
break;
case RPMTAG_TRIGGERPOSTUN:
nametag = RPMTAG_TRIGGERNAME;
tagflags |= RPMSENSE_TRIGGERPOSTUN;
- h = pkg->header;
break;
case RPMTAG_TRIGGERUN:
nametag = RPMTAG_TRIGGERNAME;
tagflags |= RPMSENSE_TRIGGERUN;
- h = pkg->header;
break;
case RPMTAG_BUILDPREREQ:
case RPMTAG_BUILDREQUIRES: