diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-05-31 16:26:24 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-05-31 16:48:33 +0300 |
commit | 8516fc22123919b4bb82db07a07764414a4a2ac7 (patch) | |
tree | 1c37f6127ac51cd4e3ad1f90f59782d179e11650 /rpmio | |
parent | 493571ce23cc0f16be37fe8b72ee6af6c35c999a (diff) | |
download | rpm-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.c | 10 |
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; |