cron(8): Correct test sense
We're about to use the result of fstat(2) either way, so don't do that if it fails... X-MFC-With: r332429
This commit is contained in:
parent
ac220fb3b7
commit
a97c64453d
@ -86,7 +86,7 @@ load_database(old_db)
|
||||
if (dp->d_name[0] == '.')
|
||||
continue;
|
||||
ret = fstatat(dirfd(dir), dp->d_name, &st, 0);
|
||||
if (ret == 0 && !S_ISREG(st.st_mode))
|
||||
if (ret != 0 || !S_ISREG(st.st_mode))
|
||||
continue;
|
||||
maxmtime = TMAX(st.st_mtime, maxmtime);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user