summaryrefslogtreecommitdiff
path: root/lib/rpmds.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-03-26 15:31:10 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-03-26 15:31:10 +0200
commita17b3b68f2c2320cd81e285e02c05ab881ad07fd (patch)
tree97279c114276ef094badbbbf918d4258922d9908 /lib/rpmds.c
parent144830cf816c9189906b0ae826418dc079ec4348 (diff)
downloadrpm-a17b3b68f2c2320cd81e285e02c05ab881ad07fd.tar.gz
rpm-a17b3b68f2c2320cd81e285e02c05ab881ad07fd.tar.bz2
rpm-a17b3b68f2c2320cd81e285e02c05ab881ad07fd.zip
Eliminate pointless xstrdup()'s, the strings are never modified
Diffstat (limited to 'lib/rpmds.c')
-rw-r--r--lib/rpmds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/rpmds.c b/lib/rpmds.c
index ba02ee32c..db8c9c21c 100644
--- a/lib/rpmds.c
+++ b/lib/rpmds.c
@@ -761,8 +761,8 @@ void parseEVR(char * evr,
int rpmdsCompare(const rpmds A, const rpmds B)
{
- char *aDepend = (A->DNEVR != NULL ? xstrdup(A->DNEVR+2) : "");
- char *bDepend = (B->DNEVR != NULL ? xstrdup(B->DNEVR+2) : "");
+ const char *aDepend = (A->DNEVR != NULL ? A->DNEVR+2 : "");
+ const char *bDepend = (B->DNEVR != NULL ? B->DNEVR+2 : "");
char *aEVR, *bEVR;
const char *aE, *aV, *aR, *bE, *bV, *bR;
int result;
@@ -838,8 +838,6 @@ exit:
if (_noisy_range_comparison_debug_message)
rpmlog(RPMLOG_DEBUG, " %s A %s\tB %s\n",
(result ? "YES" : "NO "), aDepend, bDepend);
- aDepend = _free(aDepend);
- bDepend = _free(bDepend);
return result;
}