Fix test43 for GCC/Clang
This commit is contained in:
parent
cb98b586fd
commit
1adb3b60be
1 changed files with 10 additions and 0 deletions
|
@ -188,6 +188,7 @@ static void check_realpath_recurse(const char *path, int depth)
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent *dirent;
|
struct dirent *dirent;
|
||||||
char pathsub[PATH_MAX + 1];
|
char pathsub[PATH_MAX + 1];
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
/* check with the path itself */
|
/* check with the path itself */
|
||||||
check_realpath_step_by_step(path, 0);
|
check_realpath_step_by_step(path, 0);
|
||||||
|
@ -196,6 +197,15 @@ static void check_realpath_recurse(const char *path, int depth)
|
||||||
if (depth < 1)
|
if (depth < 1)
|
||||||
return;
|
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 ..) */
|
/* loop through subdirectories (including . and ..) */
|
||||||
if (!(dir = opendir(path)))
|
if (!(dir = opendir(path)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue