From d74568b3585c7090ab25939f333b94d72ca3dd71 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Wed, 16 Mar 2011 08:23:42 -0700 Subject: Replace alloca() with c99 or gcc extension variable-length arrays. --- backtrace-symbols.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'backtrace-symbols.c') diff --git a/backtrace-symbols.c b/backtrace-symbols.c index 018879d..ff91bea 100644 --- a/backtrace-symbols.c +++ b/backtrace-symbols.c @@ -45,7 +45,6 @@ #define false 0 #define _GNU_SOURCE -#include #include #include #include @@ -324,7 +323,7 @@ char **backtrace_symbols(void /*const*/ *const *const vector, int const length) int const stack_depth = length - 1; int total = 0; - char ***const locations = alloca(sizeof(char **) * (stack_depth+1)); + char **locations[1+ stack_depth]; /* c99 or gcc extension */ bfd_init(); int x; -- cgit