From: Panu Matilainen Date: Sat, 28 May 2011 08:34:51 +0000 (+0300) Subject: Remove pointless variable and a dead assignment to it X-Git-Tag: rpm-4.10.0-beta1~503 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb4995197074939403328418736130d5df377ea3;p=platform%2Fupstream%2Frpm.git Remove pointless variable and a dead assignment to it --- diff --git a/build/build.c b/build/build.c index 7116c16..043760b 100644 --- a/build/build.c +++ b/build/build.c @@ -53,9 +53,8 @@ exit: rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char *name, const char *sb, int test) { - const char * rootDir = spec->rootDir; char *scriptName = NULL; - char * buildDir = rpmGenPath(rootDir, "%{_builddir}", ""); + char * buildDir = rpmGenPath(spec->rootDir, "%{_builddir}", ""); char * buildCmd = NULL; char * buildTemplate = NULL; char * buildPost = NULL; @@ -117,7 +116,7 @@ rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char *name, goto exit; } - fd = rpmMkTempFile(rootDir, &scriptName); + fd = rpmMkTempFile(spec->rootDir, &scriptName); if (fd == NULL || Ferror(fd)) { rpmlog(RPMLOG_ERR, _("Unable to open temp file.\n")); rc = RPMRC_FAIL; @@ -134,8 +133,6 @@ rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char *name, goto exit; } - if (*rootDir == '\0') rootDir = "/"; - buildTemplate = rpmExpand(mTemplate, NULL); buildPost = rpmExpand(mPost, NULL);