diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-05-23 22:30:54 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-05-23 22:30:54 +0000 |
commit | 6672e966fa6299cd9506b6c6084754f3cffae72b (patch) | |
tree | 86d9c78d033fc1166f09fbd6cd197d4b8b2aafc2 /usr.bin/at/at.c | |
parent | f293f85cb955f7ca9fefb4b8dff0343fadfc2ff7 (diff) |
Set tm_sec to 0 if no seconds were specified by the timespec (-t) arg.
Diffstat (limited to 'usr.bin/at/at.c')
-rw-r--r-- | usr.bin/at/at.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index b66f7d2d4da..1ce3850c74e 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.48 2007/05/23 19:50:28 millert Exp $ */ +/* $OpenBSD: at.c,v 1.49 2007/05/23 22:30:53 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.48 2007/05/23 19:50:28 millert Exp $"; +static const char rcsid[] = "$OpenBSD: at.c,v 1.49 2007/05/23 22:30:53 millert Exp $"; #endif /* Variables to remove from the job's environment. */ @@ -817,7 +817,9 @@ ttime(char *arg) else if (!isdigit((unsigned char)*p)) goto terr; } - if (dot != NULL) { + if (dot == NULL) + lt->tm_sec = 0; + else { *dot++ = '\0'; if (strlen(dot) != 2) goto terr; |