Author: kevans
Date: Thu Apr 12 14:32:26 2018
New Revision: 332431
URL: https://svnweb.freebsd.org/changeset/base/332431

Log:
  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

Modified:
  head/usr.sbin/cron/cron/database.c

Modified: head/usr.sbin/cron/cron/database.c
==============================================================================
--- head/usr.sbin/cron/cron/database.c  Thu Apr 12 14:05:27 2018        
(r332430)
+++ head/usr.sbin/cron/cron/database.c  Thu Apr 12 14:32:26 2018        
(r332431)
@@ -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);
                        }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to