From: Christian Brauner Date: Sat, 25 Aug 2018 10:04:56 +0000 (+0200) Subject: cgfsng: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/ X-Git-Tag: lxc-3.1.0~127^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c19ad94b0af04a7c0533a626791fbc505a110154;p=thirdparty%2Flxc.git cgfsng: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/ Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index e7a242910..82eb46a3b 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -55,6 +55,7 @@ #include "commands.h" #include "conf.h" #include "log.h" +#include "macro.h" #include "storage/storage.h" #include "utils.h" @@ -314,14 +315,14 @@ static char *lxc_cpumask_to_cpulist(uint32_t *bitarr, size_t nbits) int ret; size_t i; char **cpulist = NULL; - char numstr[LXC_NUMSTRLEN64] = {0}; + char numstr[INTTYPE_TO_STRLEN(size_t)] = {0}; for (i = 0; i <= nbits; i++) { if (!is_set(i, bitarr)) continue; - ret = snprintf(numstr, LXC_NUMSTRLEN64, "%zu", i); - if (ret < 0 || (size_t)ret >= LXC_NUMSTRLEN64) { + ret = snprintf(numstr, INTTYPE_TO_STRLEN(size_t), "%zu", i); + if (ret < 0 || (size_t)ret >= INTTYPE_TO_STRLEN(size_t)) { lxc_free_array((void **)cpulist, free); return NULL; }