From: Christian Brauner Date: Sun, 7 Oct 2018 07:59:16 +0000 (+0200) Subject: confile: s/MAXPATHLEN/PATH_MAX/g X-Git-Tag: lxc-3.1.0~62^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18740311c1ba851be39ebe05691b06f181e3770b;p=thirdparty%2Flxc.git confile: s/MAXPATHLEN/PATH_MAX/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 8e13b123d..19693d6a0 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2068,7 +2068,7 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf) { struct dirent *direntp; DIR *dir; - char path[MAXPATHLEN]; + char path[PATH_MAX]; int len; int ret = -1; @@ -2090,8 +2090,8 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf) if (len < 6 || strncmp(fnam + len - 5, ".conf", 5) != 0) continue; - len = snprintf(path, MAXPATHLEN, "%s/%s", dirp, fnam); - if (len < 0 || len >= MAXPATHLEN) { + len = snprintf(path, PATH_MAX, "%s/%s", dirp, fnam); + if (len < 0 || len >= PATH_MAX) { ret = -1; goto out; }