Fix test43 for GCC/Clang

This commit is contained in:
Thomas Veerman 2011-12-07 15:17:38 +00:00
parent cb98b586fd
commit 1adb3b60be

View file

@ -188,6 +188,7 @@ static void check_realpath_recurse(const char *path, int depth)
DIR *dir;
struct dirent *dirent;
char pathsub[PATH_MAX + 1];
struct stat st;
/* check with the path itself */
check_realpath_step_by_step(path, 0);
@ -196,6 +197,15 @@ static void check_realpath_recurse(const char *path, int depth)
if (depth < 1)
return;
/* don't bother with non-directories. Due to timeouts in drivers we
* might not get expected results and takes way too long */
if (stat(path, &st) != 0) {
ERR;
return;
}
if (!S_ISDIR(st.st_mode))
return;
/* loop through subdirectories (including . and ..) */
if (!(dir = opendir(path)))
{