summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-05-27 16:46:23 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-05-27 16:46:23 +0300
commitad992243e4c75cfc8a70dde3955939575b1b297d (patch)
treeab252d12966fe7d52103deb5a64bb45db18e7edd
parent41a24d3522503052d38a22290e82a15616908f65 (diff)
downloadlibrpm-tizen-ad992243e4c75cfc8a70dde3955939575b1b297d.tar.gz
librpm-tizen-ad992243e4c75cfc8a70dde3955939575b1b297d.tar.bz2
librpm-tizen-ad992243e4c75cfc8a70dde3955939575b1b297d.zip
Eliminate bunch of obvious dead NULL-assingments from misc build parts
-rw-r--r--build/expression.c2
-rw-r--r--build/files.c4
-rw-r--r--build/pack.c6
-rw-r--r--build/spec.c10
4 files changed, 11 insertions, 11 deletions
diff --git a/build/expression.c b/build/expression.c
index 72172902f..a71ad095c 100644
--- a/build/expression.c
+++ b/build/expression.c
@@ -73,7 +73,7 @@ static void valueFree( Value v)
if (v) {
if (v->type == VALUE_TYPE_STRING)
v->data.s = _free(v->data.s);
- v = _free(v);
+ free(v);
}
}
diff --git a/build/files.c b/build/files.c
index be63790c6..39f48d51d 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1329,7 +1329,7 @@ static FileListRec freeFileList(FileListRec fileList,
fileList[count].langs = _free(fileList[count].langs);
fileList[count].caps = _free(fileList[count].caps);
}
- fileList = _free(fileList);
+ free(fileList);
return NULL;
}
@@ -1855,7 +1855,7 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
if (fl.isSpecialDoc) {
/* Save this stuff for last */
- specialDoc = _free(specialDoc);
+ free(specialDoc);
specialDoc = xstrdup(fileName);
dupAttrRec(&fl.cur_ar, specialDocAttrRec);
} else if (fl.currentFlags & RPMFILE_PUBKEY) {
diff --git a/build/pack.c b/build/pack.c
index c354f9163..1cb23dd4e 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -430,7 +430,7 @@ static rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileNam
{
rpmlead lead = rpmLeadFromHeader(h);
rc = rpmLeadWrite(fd, lead);
- lead = rpmLeadFree(lead);
+ rpmLeadFree(lead);
if (rc != RPMRC_OK) {
rc = RPMRC_FAIL;
rpmlog(RPMLOG_ERR, _("Unable to write package: %s\n"),
@@ -470,7 +470,7 @@ static rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileNam
#endif
xx = headerWrite(fd, nh, HEADER_MAGIC_YES);
- nh = headerFree(nh);
+ headerFree(nh);
if (xx) {
rc = RPMRC_FAIL;
@@ -620,7 +620,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
{ char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
char *binRpm, *binDir;
binRpm = headerFormat(pkg->header, binFormat, &errorString);
- binFormat = _free(binFormat);
+ free(binFormat);
if (binRpm == NULL) {
rpmlog(RPMLOG_ERR, _("Could not generate output "
"filename for package %s: %s\n"),
diff --git a/build/spec.c b/build/spec.c
index e627c85be..abbd2289f 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -34,7 +34,7 @@ struct TriggerFileEntry * freeTriggerFiles(struct TriggerFileEntry * p)
o->fileName = _free(o->fileName);
o->script = _free(o->script);
o->prog = _free(o->prog);
- o = _free(o);
+ free(o);
}
return NULL;
}
@@ -53,7 +53,7 @@ struct Source * freeSources(struct Source * s)
r = t;
t = t->next;
r->fullSource = _free(r->fullSource);
- r = _free(r);
+ free(r);
}
return NULL;
}
@@ -139,7 +139,7 @@ static Package freePackage(Package pkg)
pkg->icon = freeSources(pkg->icon);
pkg->triggerFiles = freeTriggerFiles(pkg->triggerFiles);
- pkg = _free(pkg);
+ free(pkg);
return NULL;
}
@@ -150,7 +150,7 @@ static Package freePackages(Package packages)
while ((p = packages) != NULL) {
packages = p->next;
p->next = NULL;
- p = freePackage(p);
+ freePackage(p);
}
return NULL;
}
@@ -412,6 +412,6 @@ int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
}
exit:
- spec = rpmSpecFree(spec);
+ rpmSpecFree(spec);
return res;
}