(submit/os-backtrace-vla) os: backtrace: use fixed size array instead of vla
The backtrace buffer size (BT_SIZE) is determined by compile time, so we can change BT_SIZE into a #define to turn vla into fixed array. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
b54ebcdc75
commit
1b16405b49
|
@ -190,10 +190,10 @@ xorg_backtrace(void)
|
|||
#include <dlfcn.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
#define BT_SIZE 64
|
||||
void
|
||||
xorg_backtrace(void)
|
||||
{
|
||||
const int BT_SIZE = 64;
|
||||
void *array[BT_SIZE];
|
||||
const char *mod;
|
||||
int size, i;
|
||||
|
|
Loading…
Reference in New Issue