Use _free() instead of rfree() where "return value" is assigned

This commit is contained in:
Panu Matilainen 2010-09-21 14:33:57 +03:00
parent e3e69b44e5
commit 67a3e424ed
2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ struct rpmfcTokens_s {
static char *rpmfcAttrMacro(const char *name, const char *attr)
{
char *macro = rpmExpand("%{?__", name, "_", attr, "}", NULL);
return rstreq(macro, "") ? rfree(macro) : macro;
return rstreq(macro, "") ? _free(macro) : macro;
}
static regex_t *rpmfcAttrReg(const char *name, const char *attr)
@ -73,7 +73,7 @@ static regex_t *rpmfcAttrReg(const char *name, const char *attr)
reg = rcalloc(1, sizeof(*reg));
if (regcomp(reg, pattern, REG_EXTENDED) != 0) {
rpmlog(RPMLOG_WARNING, _("Ignoring invalid regex %s\n"), pattern);
reg = rfree(reg);
reg = _free(reg);
}
rfree(pattern);
}
@ -442,7 +442,7 @@ static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
}
rasprintf(&buf, "%%{?%s:%%{%s} %%{?%s_opts}}", mname, mname, mname);
argvAdd(&av, buf);
buf = rfree(buf);
buf = _free(buf);
sb_stdin = newStringBuf();
appendLineStringBuf(sb_stdin, fn);

View File

@ -30,7 +30,7 @@ int rpmChrootSet(const char *rootDir)
if (rootState.chrootDone != 0)
return -1;
rootState.rootDir = rfree(rootState.rootDir);
rootState.rootDir = _free(rootState.rootDir);
if (rootState.cwd >= 0) {
close(rootState.cwd);
rootState.cwd = -1;