summaryrefslogtreecommitdiff
path: root/usr.bin/touch
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 /usr.bin/touch
parent23f72804857bec013f8ffa103f42ac1fb1f849e3 (diff)
Fix typo introduced in seconds parsing. From Tim van der Molen.
Diffstat (limited to 'usr.bin/touch')
-rw-r--r--usr.bin/touch/touch.c4
1 files changed, 2 insertions, 2 deletions
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;