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:
Kyle Evans 2018-04-12 14:32:26 +00:00
parent ac220fb3b7
commit a97c64453d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332431

View file

@ -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);
}