summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2007-06-18 11:20:58 +0000
committermillert <millert@openbsd.org>2007-06-18 11:20:58 +0000
commit6f9f91ed647fa590646bfcaecf2951dd8cc4efa1 (patch)
treefd3c2f06a6e8afe3c6583d46b413d45601c5401c
parentadd tag no shadow, to allow us to specify that we do NOT want tempfiles (diff)
downloadwireguard-openbsd-6f9f91ed647fa590646bfcaecf2951dd8cc4efa1.tar.xz
wireguard-openbsd-6f9f91ed647fa590646bfcaecf2951dd8cc4efa1.zip
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;