log: s/MAXPATHLEN/PATH_MAX/g

parent 84da464d
...@@ -339,7 +339,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ ...@@ -339,7 +339,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
#ifdef STRERROR_R_CHAR_P #ifdef STRERROR_R_CHAR_P
#define lxc_log_strerror_r \ #define lxc_log_strerror_r \
char errno_buf[MAXPATHLEN / 2] = {"Failed to get errno string"}; \ char errno_buf[PATH_MAX / 2] = {"Failed to get errno string"}; \
char *ptr = NULL; \ char *ptr = NULL; \
{ \ { \
int saved_errno = errno; \ int saved_errno = errno; \
...@@ -350,7 +350,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ ...@@ -350,7 +350,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
} }
#else #else
#define lxc_log_strerror_r \ #define lxc_log_strerror_r \
char errno_buf[MAXPATHLEN / 2] = {"Failed to get errno string"}; \ char errno_buf[PATH_MAX / 2] = {"Failed to get errno string"}; \
char *ptr = errno_buf; \ char *ptr = errno_buf; \
{ \ { \
int saved_errno = errno; \ int saved_errno = errno; \
...@@ -361,10 +361,10 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ ...@@ -361,10 +361,10 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
#elif ENFORCE_THREAD_SAFETY #elif ENFORCE_THREAD_SAFETY
#error ENFORCE_THREAD_SAFETY was set but cannot be guaranteed #error ENFORCE_THREAD_SAFETY was set but cannot be guaranteed
#else #else
#define lxc_log_strerror_r \ #define lxc_log_strerror_r \
char *ptr = NULL; \ char *ptr = NULL; \
{ \ { \
ptr = strerror(errno); \ ptr = strerror(errno); \
} }
#endif #endif
......
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