summaryrefslogtreecommitdiff
path: root/lib/rpmrc.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-05-27 09:40:23 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-05-27 15:05:22 +0300
commit9202f7daa6ba98b55fdd8478aa6e4680f8ab3e23 (patch)
tree1e434cac517a7ca4003b9cdce1ec80aed474a7c0 /lib/rpmrc.c
parente425e75311d0c6f6e12ea24d84d2f01759de46f9 (diff)
downloadlibrpm-tizen-9202f7daa6ba98b55fdd8478aa6e4680f8ab3e23.tar.gz
librpm-tizen-9202f7daa6ba98b55fdd8478aa6e4680f8ab3e23.tar.bz2
librpm-tizen-9202f7daa6ba98b55fdd8478aa6e4680f8ab3e23.zip
Clean up rpmrc include processing a bit
- Eliminate pointless switch-case when we only care about one possibility here. Also eliminate a dead-increment which becomes more obvious now with the surroundings unobfuscated.
Diffstat (limited to 'lib/rpmrc.c')
-rw-r--r--lib/rpmrc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 66d7b778b..fe9ef30c1 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -505,26 +505,18 @@ static rpmRC doReadRC(const char * urlfn)
goto exit;
}
- switch (option->var) {
- case RPMVAR_INCLUDE:
+ if (option->var == RPMVAR_INCLUDE) {
s = se;
while (*se && !risspace(*se)) se++;
- if (*se != '\0') *se++ = '\0';
-
-#if 0 /* XXX doesn't seem to do anything useful, only break things... */
- rpmRebuildTargetVars(NULL, NULL);
-#endif
+ if (*se != '\0') *se = '\0';
if (doReadRC(s)) {
rpmlog(RPMLOG_ERR, _("cannot open %s at %s:%d: %m\n"),
s, fn, linenum);
goto exit;
- } else {
- continue; /* XXX don't save include value as var/macro */
}
- break;
- default:
- break;
+ /* XXX don't save include value as var/macro */
+ continue;
}
if (option->archSpecific) {