summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-05-28 19:43:52 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-05-28 19:43:52 +0300
commit182e9f8a64712b682db604e03aafa2ffe3c82e21 (patch)
tree14bf31aa2081de3eeec1ba443a7503262f1b25cd
parentf1c46157fbca4d29639e8602b4e0de02e33489d0 (diff)
downloadrpm-182e9f8a64712b682db604e03aafa2ffe3c82e21.tar.gz
rpm-182e9f8a64712b682db604e03aafa2ffe3c82e21.tar.bz2
rpm-182e9f8a64712b682db604e03aafa2ffe3c82e21.zip
Eliminate bunch of obvious dead NULL-assignments around librpmio
-rw-r--r--rpmio/macro.c2
-rw-r--r--rpmio/rpmfileutil.c12
-rw-r--r--rpmio/url.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 6e085e99c..edf0c7f5b 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -1603,7 +1603,7 @@ rpmExpandNumeric(const char *arg)
if (!(end && *end == '\0'))
rc = 0;
}
- val = _free(val);
+ free(val);
return rc;
}
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c
index 6085a4657..506b97c86 100644
--- a/rpmio/rpmfileutil.c
+++ b/rpmio/rpmfileutil.c
@@ -528,9 +528,9 @@ char * rpmGenPath(const char * urlroot, const char * urlmdir,
result = rpmGetPath(url, root, "/", mdir, "/", file, NULL);
- xroot = _free(xroot);
- xmdir = _free(xmdir);
- xfile = _free(xfile);
+ free(xroot);
+ free(xmdir);
+ free(xfile);
free(url);
return result;
}
@@ -651,7 +651,7 @@ int rpmGlob(const char * patterns, int * argcPtr, ARGV_t * argvPtr)
argvAdd(&argv, globURL);
}
globfree(&gl);
- globURL = _free(globURL);
+ free(globURL);
}
argc = argvCount(argv);
@@ -669,11 +669,11 @@ exit:
#ifdef ENABLE_NLS
if (old_collate) {
(void) setlocale(LC_COLLATE, old_collate);
- old_collate = _free(old_collate);
+ free(old_collate);
}
if (old_ctype) {
(void) setlocale(LC_CTYPE, old_ctype);
- old_ctype = _free(old_ctype);
+ free(old_ctype);
}
#endif
av = _free(av);
diff --git a/rpmio/url.c b/rpmio/url.c
index fc31f36a7..ac29933c9 100644
--- a/rpmio/url.c
+++ b/rpmio/url.c
@@ -111,7 +111,6 @@ int urlGetFile(const char * url, const char * dest)
/* XXX TODO: sanity checks like target == dest... */
rasprintf(&cmd, "%s %s %s", urlhelper, target, url);
- urlhelper = _free(urlhelper);
if ((pid = fork()) == 0) {
ARGV_t argv = NULL;
@@ -120,6 +119,7 @@ int urlGetFile(const char * url, const char * dest)
exit(127); /* exit with 127 for compatibility with bash(1) */
}
free(cmd);
+ free(urlhelper);
return ((waitpid(pid, &status, 0) != -1) &&
WIFEXITED(status) && (WEXITSTATUS(status) == 0)) ? 0 : -1;