confile: s/MAXPATHLEN/PATH_MAX/g

parent 6b5a54cd
...@@ -2068,7 +2068,7 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf) ...@@ -2068,7 +2068,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;
...@@ -2090,8 +2090,8 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf) ...@@ -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) 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