summaryrefslogtreecommitdiffstats
path: root/memstomp.c
diff options
context:
space:
mode:
authorJohn Reiser <jreiser@BitWagon.com>2011-03-16 08:23:42 -0700
committerWilliam Cohen <wcohen@redhat.com>2011-03-22 09:48:47 -0400
commitd74568b3585c7090ab25939f333b94d72ca3dd71 (patch)
tree1ba252a21b642251f4c8d00907ce48083ee98483 /memstomp.c
parent51a3033fa1dc443da470e2d1425eb50a1395b36a (diff)
downloadmemstomp-d74568b3585c7090ab25939f333b94d72ca3dd71.tar.gz
memstomp-d74568b3585c7090ab25939f333b94d72ca3dd71.tar.xz
memstomp-d74568b3585c7090ab25939f333b94d72ca3dd71.zip
Replace alloca() with c99 or gcc extension variable-length arrays.
Diffstat (limited to 'memstomp.c')
-rw-r--r--memstomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memstomp.c b/memstomp.c
index 7339872..28a0320 100644
--- a/memstomp.c
+++ b/memstomp.c
@@ -223,7 +223,7 @@ static char* generate_stacktrace(void) {
size_t k;
bool b;
- void **const buffer = alloca(sizeof(void*) * frames_max);
+ void *buffer[frames_max]; /* c99 or gcc extension */
n = real_backtrace(buffer, frames_max);
assert(n >= 0);