diff options
author | brian <brian@FreeBSD.org> | 1997-05-10 05:29:41 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-05-10 05:29:41 +0000 |
commit | 006e3f0640abe8628f9fafd8148494bb5ca8b3a1 (patch) | |
tree | 5dd6d809dedcf794950196daf3a0479d31f1ae12 /sys/kern/kern_time.c | |
parent | fecb2556c8edf43dca1bcc0ce180495d6eeb03e3 (diff) | |
download | FreeBSD-src-006e3f0640abe8628f9fafd8148494bb5ca8b3a1.zip FreeBSD-src-006e3f0640abe8628f9fafd8148494bb5ca8b3a1.tar.gz |
Don't require that it_interval be valid if
it_value is set to zero - as per documentation.
Suggested by: ache & bde
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 07120b9..41ca7eb 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id: kern_time.c,v 1.22 1997/03/22 08:03:32 bde Exp $ + * $Id: kern_time.c,v 1.23 1997/05/08 14:16:25 peter Exp $ */ #include <sys/param.h> @@ -485,8 +485,11 @@ setitimer(p, uap, retval) return (error); if (itvp == 0) return (0); - if (itimerfix(&aitv.it_value) || itimerfix(&aitv.it_interval)) + if (itimerfix(&aitv.it_value)) return (EINVAL); + if (aitv.it_value.tv_sec || aitv.it_value.tv_usec) + if (itimerfix(&aitv.it_interval)) + return (EINVAL); s = splclock(); if (uap->which == ITIMER_REAL) { untimeout(realitexpire, (caddr_t)p); |