X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=0f1a3402237a265d2480b5e865837938959ad6c1;hp=3bd8633873cb7c40cb99c284a2d3ad7fdebadf4f;hb=e85b2b83e39b64ba5cb73fbfddbf3902b6e84925;hpb=96d32d518a0743a6c050057bc1562e4883e51c5d diff --git a/filesetup.c b/filesetup.c index 3bd86338..0f1a3402 100644 --- a/filesetup.c +++ b/filesetup.c @@ -519,9 +519,8 @@ static int recurse_dir(struct thread_data *td, const char *dirname) char full_path[PATH_MAX]; struct stat sb; - /* - * check d_ino here? - */ + if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, "..")) + continue; sprintf(full_path, "%s/%s", dirname, dir->d_name); @@ -538,9 +537,6 @@ static int recurse_dir(struct thread_data *td, const char *dirname) continue; } - if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, "..")) - continue; - if ((ret = recurse_dir(td, full_path)) != 0) break; }