summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEgbert Eich <eich@freedesktop.org>2008-04-16 22:31:11 +0200
committerEgbert Eich <eich@freedesktop.org>2008-04-16 22:31:11 +0200
commit0ffd41e0840b437197d27451ba48a29d3808b77d (patch)
tree31a50618b928042eff83b74a522d0eb143cb2e95 /utils
parentbdea7eba152e0b2b5d4f4b24a4ad9d66e57c1eed (diff)
Remove call to alloca().
alloca() is very system dependent. Using it here is not worth the trouble.
Diffstat (limited to 'utils')
-rw-r--r--utils/conntest/rhd_conntest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/conntest/rhd_conntest.c b/utils/conntest/rhd_conntest.c
index 9e2a0ae..4875dcd 100644
--- a/utils/conntest/rhd_conntest.c
+++ b/utils/conntest/rhd_conntest.c
@@ -38,7 +38,6 @@
#include <pci/pci.h>
#include <unistd.h>
#include <stdlib.h>
-#include <alloca.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -2016,7 +2015,7 @@ DDCScanBus(void *map, int count)
unsigned char *data = NULL;
if (count)
- data = alloca(count);
+ data = malloc(count);
for (channel = 0; channel < max_chan; channel ++) {
int state = 0;
@@ -2039,6 +2038,7 @@ DDCScanBus(void *map, int count)
if (state == 1)
printf("\n");
}
+ if (data) free(data);
}
/*