error in strtonum() conversion; found by Nathanael Rensen
authorderaadt <deraadt@openbsd.org>
Thu, 23 Apr 2015 02:13:18 +0000 (02:13 +0000)
committerderaadt <deraadt@openbsd.org>
Thu, 23 Apr 2015 02:13:18 +0000 (02:13 +0000)
sbin/shutdown/shutdown.c

index 07f9fb2..c06fc40 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: shutdown.c,v 1.42 2015/04/18 18:28:37 deraadt Exp $   */
+/*     $OpenBSD: shutdown.c,v 1.43 2015/04/23 02:13:18 deraadt Exp $   */
 /*     $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */
 
 /*
@@ -440,7 +440,7 @@ getoffset(char *timearg)
                const char *errstr;
 
                offset = strtonum(++timearg, 0, INT_MAX, &errstr);
-               if (errstr);
+               if (errstr)
                        badtime();
                offset *= 60;
                shuttime = now + offset;