summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-05-31 16:26:24 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-05-31 16:48:33 +0300
commit8516fc22123919b4bb82db07a07764414a4a2ac7 (patch)
tree1c37f6127ac51cd4e3ad1f90f59782d179e11650 /rpmio
parent493571ce23cc0f16be37fe8b72ee6af6c35c999a (diff)
downloadrpm-8516fc22123919b4bb82db07a07764414a4a2ac7.tar.gz
rpm-8516fc22123919b4bb82db07a07764414a4a2ac7.tar.bz2
rpm-8516fc22123919b4bb82db07a07764414a4a2ac7.zip
We always have xstrdup() available, eliminate redundant alternatve
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmglob.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c
index 59c392aaf..00b3c46e2 100644
--- a/rpmio/rpmglob.c
+++ b/rpmio/rpmglob.c
@@ -468,17 +468,7 @@ glob(const char *pattern, int flags,
while (pglob->gl_pathc < pglob->gl_offs)
pglob->gl_pathv[pglob->gl_pathc++] = NULL;
-#if defined HAVE_STRDUP || defined _LIBC
pglob->gl_pathv[pglob->gl_pathc] = xstrdup(dirname);
-#else
- {
- size_t len = strlen(dirname) + 1;
- char *dircopy = xmalloc(len);
- if (dircopy != NULL)
- pglob->gl_pathv[pglob->gl_pathc] =
- memcpy(dircopy, dirname, len);
- }
-#endif
if (pglob->gl_pathv[pglob->gl_pathc] == NULL) {
free(pglob->gl_pathv);
return GLOB_NOSPACE;