]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 25 Aug 2018 10:16:32 +0000 (12:16 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 28 Aug 2018 18:14:52 +0000 (20:14 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 2c37caefd9dfc2455ca63bdd0299c26fb2ab9424..002c4ec70b32e27631e29d8788f8b525fb1ca925 100644 (file)
@@ -1037,10 +1037,10 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a
         */
        if (c->pidfile) {
                int ret, w;
-               char pidstr[LXC_NUMSTRLEN64];
+               char pidstr[INTTYPE_TO_STRLEN(int)];
 
-               w = snprintf(pidstr, LXC_NUMSTRLEN64, "%d", (int)lxc_raw_getpid());
-               if (w < 0 || (size_t)w >= LXC_NUMSTRLEN64) {
+               w = snprintf(pidstr, INTTYPE_TO_STRLEN(int), "%d", (int)lxc_raw_getpid());
+               if (w < 0 || (size_t)w >= INTTYPE_TO_STRLEN(int)) {
                        free_init_cmd(init_cmd);
                        lxc_free_handler(handler);