Unverified Commit aec25005 by Wolfgang Bumiller Committed by GitHub

Merge pull request #2604 from brauner/2018-09-09/fix_pid_file

lxccontainer: use correct pid_t type
parents 855358c8 b07ea13d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment