summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-06-18 11:20:59 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-06-18 11:20:59 +0000
commit787d171bda69619e268f62cc092e795a8a07bddf (patch)
treecc13d6cd8826e2f12e5bfeccdc54d67b2ae8289e
parent23f72804857bec013f8ffa103f42ac1fb1f849e3 (diff)
Fix typo introduced in seconds parsing. From Tim van der Molen.
-rw-r--r--usr.bin/at/at.c6
-rw-r--r--usr.bin/touch/touch.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index 6626a47bece..b256401a81e 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: at.c,v 1.51 2007/05/24 12:24:43 millert Exp $ */
+/* $OpenBSD: at.c,v 1.52 2007/06/18 11:20:58 millert Exp $ */
/*
* at.c : Put file into atrun queue
@@ -42,7 +42,7 @@
#define TIMESIZE 50 /* Size of buffer passed to strftime() */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: at.c,v 1.51 2007/05/24 12:24:43 millert Exp $";
+static const char rcsid[] = "$OpenBSD: at.c,v 1.52 2007/06/18 11:20:58 millert Exp $";
#endif
/* Variables to remove from the job's environment. */
@@ -812,7 +812,7 @@ ttime(char *arg)
/* Valid date format is [[CC]YY]MMDDhhmm[.SS] */
for (p = arg, dot = NULL; *p != '\0'; p++) {
- if (*p == '.' && dot != NULL)
+ if (*p == '.' && dot == NULL)
dot = p;
else if (!isdigit((unsigned char)*p))
goto terr;
diff --git a/usr.bin/touch/touch.c b/usr.bin/touch/touch.c
index d473477f31c..f8f9ccf4c94 100644
--- a/usr.bin/touch/touch.c
+++ b/usr.bin/touch/touch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: touch.c,v 1.15 2007/05/25 13:56:59 millert Exp $ */
+/* $OpenBSD: touch.c,v 1.16 2007/06/18 11:20:58 millert Exp $ */
/* $NetBSD: touch.c,v 1.11 1995/08/31 22:10:06 jtc Exp $ */
/*
@@ -181,7 +181,7 @@ stime_arg1(char *arg, struct timeval *tvp)
err(1, "localtime");
/* [[CC]YY]MMDDhhmm[.SS] */
for (p = arg, dot = NULL; *p != '\0'; p++) {
- if (*p == '.' && dot != NULL)
+ if (*p == '.' && dot == NULL)
dot = p;
else if (!isdigit((unsigned char)*p))
goto terr;