diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-05-31 16:19:16 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-05-31 16:48:17 +0300 |
commit | 81560ef2e53f0565d0d53892c2d53110a7d12e33 (patch) | |
tree | 2679b585f2d32261a2058a8dcff18a2f54ceba22 /rpmio/rpmglob.c | |
parent | 9dc4c3c2d7820bb69be698c6b07a9e9887478f77 (diff) | |
download | rpm-81560ef2e53f0565d0d53892c2d53110a7d12e33.tar.gz |
Remove __GNUC__ conditionals on variable sized local arrays
- We require a C99 compiler anyway so these conditionals are not needed
Diffstat (limited to 'rpmio/rpmglob.c')
-rw-r--r-- | rpmio/rpmglob.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c index 7d3b1776b..3bdb855df 100644 --- a/rpmio/rpmglob.c +++ b/rpmio/rpmglob.c @@ -194,16 +194,7 @@ glob(const char *pattern, int flags, const char *next; const char *rest; size_t rest_len; -#ifdef __GNUC__ char onealt[strlen(pattern) - 1]; -#else - char *onealt = (char *) xmalloc(strlen(pattern) - 1); - if (onealt == NULL) { - if (!(flags & GLOB_APPEND)) - globfree(pglob); - return GLOB_NOSPACE; - } -#endif /* We know the prefix for all sub-patterns. */ #ifdef HAVE_MEMPCPY @@ -218,9 +209,6 @@ glob(const char *pattern, int flags, next = next_brace_sub(begin + 1); if (next == NULL) { /* It is an illegal expression. */ -#ifndef __GNUC__ - free(onealt); -#endif return glob(pattern, flags & ~GLOB_BRACE, errfunc, pglob); } @@ -230,9 +218,6 @@ glob(const char *pattern, int flags, rest = next_brace_sub(rest + 1); if (rest == NULL) { /* It is an illegal expression. */ -#ifndef __GNUC__ - free(onealt); -#endif return glob(pattern, flags & ~GLOB_BRACE, errfunc, pglob); } @@ -273,9 +258,6 @@ glob(const char *pattern, int flags, /* If we got an error, return it. */ if (result && result != GLOB_NOMATCH) { -#ifndef __GNUC__ - free(onealt); -#endif if (!(flags & GLOB_APPEND)) globfree(pglob); return result; @@ -290,10 +272,6 @@ glob(const char *pattern, int flags, assert(next != NULL); } -#ifndef __GNUC__ - free(onealt); -#endif - if (pglob->gl_pathc != firstc) /* We found some entries. */ return 0; |