diff options
| author | 2000-07-17 05:43:10 +0000 | |
|---|---|---|
| committer | 2000-07-17 05:43:10 +0000 | |
| commit | c09759ccacaaa592a55eaa72137f3aca98647a15 (patch) | |
| tree | 00549e68293027af4721bfa5f07e214c5ccc234d /sys/compat/linux/linux_misc.c | |
| parent | Add -o option for printing file offset. Also some whitespace reformatting. (diff) | |
| download | wireguard-openbsd-c09759ccacaaa592a55eaa72137f3aca98647a15.tar.xz wireguard-openbsd-c09759ccacaaa592a55eaa72137f3aca98647a15.zip | |
Be more careful about return values from hzto.
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 03f07b4357a..8d9dad211a8 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.28 2000/06/26 16:21:27 art Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.29 2000/07/17 05:43:10 art Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /* @@ -785,6 +785,7 @@ linux_sys_alarm(p, v, retval) } */ *uap = v; int s; struct itimerval *itp, it; + int timo; itp = &p->p_realtimer; s = splclock(); @@ -825,8 +826,11 @@ linux_sys_alarm(p, v, retval) } if (timerisset(&it.it_value)) { + timo = hzto(&it.it_value); + if (timo < 0) + timo = 1; timeradd(&it.it_value, &time, &it.it_value); - timeout_add(&p->p_realit_to, hzto(&it.it_value)); + timeout_add(&p->p_realit_to, timo); } p->p_realtimer = it; splx(s); |
