From: Christian Brauner Date: Sun, 7 Oct 2018 08:00:50 +0000 (+0200) Subject: log: s/MAXPATHLEN/PATH_MAX/g X-Git-Tag: lxc-3.1.0~62^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52539fcc7783e417f724f51836ab3470776ea246;p=thirdparty%2Flxc.git log: s/MAXPATHLEN/PATH_MAX/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/log.h b/src/lxc/log.h index 7760f63b7..008df7a73 100644 --- a/src/lxc/log.h +++ b/src/lxc/log.h @@ -339,7 +339,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ #ifdef STRERROR_R_CHAR_P #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; \ { \ int saved_errno = errno; \ @@ -350,7 +350,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ } #else #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; \ { \ int saved_errno = errno; \ @@ -361,10 +361,10 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ #elif ENFORCE_THREAD_SAFETY #error ENFORCE_THREAD_SAFETY was set but cannot be guaranteed #else - #define lxc_log_strerror_r \ - char *ptr = NULL; \ - { \ - ptr = strerror(errno); \ + #define lxc_log_strerror_r \ + char *ptr = NULL; \ + { \ + ptr = strerror(errno); \ } #endif