mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 14:30:32 +00:00
monitor: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
da07fe61fc
commit
397a8d30a8
@ -46,6 +46,7 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "lxclock.h"
|
#include "lxclock.h"
|
||||||
|
#include "macro.h"
|
||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@ -299,7 +300,7 @@ int lxc_monitord_spawn(const char *lxcpath)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int pipefd[2];
|
int pipefd[2];
|
||||||
char pipefd_str[LXC_NUMSTRLEN64];
|
char pipefd_str[INTTYPE_TO_STRLEN(int)];
|
||||||
pid_t pid1, pid2;
|
pid_t pid1, pid2;
|
||||||
|
|
||||||
char *const args[] = {
|
char *const args[] = {
|
||||||
@ -370,8 +371,8 @@ int lxc_monitord_spawn(const char *lxcpath)
|
|||||||
|
|
||||||
close(pipefd[0]);
|
close(pipefd[0]);
|
||||||
|
|
||||||
ret = snprintf(pipefd_str, LXC_NUMSTRLEN64, "%d", pipefd[1]);
|
ret = snprintf(pipefd_str, INTTYPE_TO_STRLEN(int), "%d", pipefd[1]);
|
||||||
if (ret < 0 || ret >= LXC_NUMSTRLEN64) {
|
if (ret < 0 || ret >= INTTYPE_TO_STRLEN(int)) {
|
||||||
ERROR("Failed to create pid argument to pass to monitord.");
|
ERROR("Failed to create pid argument to pass to monitord.");
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user