confile: s/MAXPATHLEN/PATH_MAX/g

parent 11b09366
......@@ -1919,7 +1919,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;
......@@ -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)
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;
}
......
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