mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 05:31:07 +00:00
lxccontainer: use correct pid_t type
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
88fbc01082
commit
b07ea13d4a
@ -1040,9 +1040,9 @@ 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[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)) {
|
if (w < 0 || (size_t)w >= sizeof(pidstr)) {
|
||||||
free_init_cmd(init_cmd);
|
free_init_cmd(init_cmd);
|
||||||
lxc_free_handler(handler);
|
lxc_free_handler(handler);
|
||||||
|
Loading…
Reference in New Issue
Block a user