lxccontainer: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-08-25 12:16:32 +02:00
parent 2955a58ab4
commit da07fe61fc
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

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