Skip to content

Commit

Permalink
lxccontainer: use correct pid_t type
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Sep 11, 2018
1 parent 88fbc01 commit b07ea13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -1040,9 +1040,9 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a
*/
if (c->pidfile) {
int ret, w;
char pidstr[INTTYPE_TO_STRLEN(int)];
char pidstr[INTTYPE_TO_STRLEN(pid_t)];

w = snprintf(pidstr, sizeof(pidstr), "%d", (int)lxc_raw_getpid());
w = snprintf(pidstr, sizeof(pidstr), "%d", lxc_raw_getpid());
if (w < 0 || (size_t)w >= sizeof(pidstr)) {
free_init_cmd(init_cmd);
lxc_free_handler(handler);
Expand Down

0 comments on commit b07ea13

Please sign in to comment.