Skip to content

Commit

Permalink
macro: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
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 Aug 28, 2018
1 parent c6de4db commit 2955a58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lxc/macro.h
Expand Up @@ -32,6 +32,7 @@
#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>

/* Define __S_ISTYPE if missing from the C library. */
#ifndef __S_ISTYPE
Expand Down Expand Up @@ -135,9 +136,9 @@
* +
* \0 = 1
*/
#define LXC_PROC_PID_FD_LEN (6 + LXC_NUMSTRLEN64 + 4 + LXC_NUMSTRLEN64 + 1)
#define LXC_PROC_PID_FD_LEN (6 + INTTYPE_TO_STRLEN(pid_t) + 4 + INTTYPE_TO_STRLEN(int) + 1)
/* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
#define LXC_PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
#define LXC_PROC_STATUS_LEN (5 + (INTTYPE_TO_STRLEN(pid_t)) + 7 + 1)
#define LXC_CMD_DATA_MAX (MAXPATHLEN * 2)
#define LXC_LSMATTRLEN (5 + (INTTYPE_TO_STRLEN(pid_t)) + 7 + 1)

Expand Down

0 comments on commit 2955a58

Please sign in to comment.