confile: s/MAXPATHLEN/PATH_MAX/g

parent 11b09366
...@@ -1919,7 +1919,7 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf) ...@@ -1919,7 +1919,7 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf)
{ {
struct dirent *direntp; struct dirent *direntp;
DIR *dir; DIR *dir;
char path[MAXPATHLEN]; char path[PATH_MAX];
int len; int len;
int ret = -1; int ret = -1;
...@@ -1941,8 +1941,8 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf) ...@@ -1941,8 +1941,8 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf)
if (len < 6 || strncmp(fnam + len - 5, ".conf", 5) != 0) if (len < 6 || strncmp(fnam + len - 5, ".conf", 5) != 0)
continue; continue;
len = snprintf(path, MAXPATHLEN, "%s/%s", dirp, fnam); len = snprintf(path, PATH_MAX, "%s/%s", dirp, fnam);
if (len < 0 || len >= MAXPATHLEN) { if (len < 0 || len >= PATH_MAX) {
ret = -1; ret = -1;
goto out; goto out;
} }
......
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