X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsmp.c;h=980947cf4de9431880494a0d55914811ec974bd0;hb=feac72042ef1572189d4280a4f151ce049ac2b1e;hp=d7ba23c4f263b2afec7fd906f2cc525fbd745dbd;hpb=0446ebf343709f77a41d9f703daaf1174b079d37;p=lttng-ust.git diff --git a/src/common/smp.c b/src/common/smp.c index d7ba23c4..980947cf 100644 --- a/src/common/smp.c +++ b/src/common/smp.c @@ -10,13 +10,13 @@ #include #include #include +#include #include #include #include #include -#include "common/align.h" #include "common/logging.h" #include "common/smp.h" @@ -190,11 +190,10 @@ error: static void _get_num_possible_cpus(void) { int ret; - int buf_len = LTTNG_UST_PAGE_SIZE; - char buf[buf_len]; + char buf[LTTNG_UST_CPUMASK_SIZE]; /* Get the possible cpu mask from sysfs, fallback to sysconf. */ - ret = get_possible_cpu_mask_from_sysfs((char *) &buf, buf_len); + ret = get_possible_cpu_mask_from_sysfs((char *) &buf, LTTNG_UST_CPUMASK_SIZE); if (ret <= 0) goto fallback;