diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-04-21 07:39:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-04-21 07:39:16 +0000 |
commit | 8498eb861ff4863bf6d8a244c798552f7e2f25b0 (patch) | |
tree | f1b7e3254e3bd38f2083eeedb3bc5e97f0bb39f3 /sys/kern/kern_ktrace.c | |
parent | c32385432a71d938cb36758a370df5c06d542673 (diff) |
do not declare and use a local variable which conflicts with a global
variable which is used by a macro when VM is used instead of UVM. very
cute, Art -- 10 points for artistic expression.
Diffstat (limited to 'sys/kern/kern_ktrace.c')
-rw-r--r-- | sys/kern/kern_ktrace.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 240d13c8fb1..62bd73a871f 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.18 2000/04/20 10:03:42 art Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.19 2000/04/21 07:39:15 deraadt Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -194,7 +194,7 @@ ktrgenio(vp, fd, rw, iov, len, error) struct ktr_header kth; struct ktr_genio *ktp; caddr_t cp; - int resid = len, cnt; + int resid = len, count; struct proc *p = curproc; /* XXX */ int buflen; @@ -223,24 +223,24 @@ ktrgenio(vp, fd, rw, iov, len, error) if (p->p_schedflags & PSCHED_SHOULDYIELD) preempt(NULL); - cnt = min(iov->iov_len, buflen); - if (cnt > resid) - cnt = resid; - if (copyin(iov->iov_base, cp, cnt)) + count = min(iov->iov_len, buflen); + if (count > resid) + count = resid; + if (copyin(iov->iov_base, cp, count)) break; - kth.ktr_len = cnt + sizeof(struct ktr_genio); + kth.ktr_len = count + sizeof(struct ktr_genio); if (ktrwrite(vp, &kth) != 0) break; - iov->iov_len -= cnt; - iov->iov_base += cnt; + iov->iov_len -= count; + iov->iov_base += count; if (iov->iov_len == 0) iov++; - resid -= cnt; + resid -= count; } FREE(ktp, M_TEMP); |