Add a missing check for negative tv_sec when setting the timeout.
authormillert <millert@openbsd.org>
Fri, 8 Jul 2022 20:47:24 +0000 (20:47 +0000)
committermillert <millert@openbsd.org>
Fri, 8 Jul 2022 20:47:24 +0000 (20:47 +0000)
commit9c847fa89616307ef9664ddfa4e7537e642b50bc
tree0c321545a9715dd71f4e77480af0ea3562ae793d
parent055943a192f18e1315df27bcd3114dacc5842dc7
Add a missing check for negative tv_sec when setting the timeout.
Also clear the entire timeout if the remaining time becomes negative
instead of just clearing tv_sec or tv_nsec.  OK cheloha@.
usr.sbin/cron/cron.c