summaryrefslogtreecommitdiff
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-03-03 11:31:44 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-03-03 11:31:44 +0000
commit84302ed6bdbf915dcfe0287bb7348a6d17e00d1a (patch)
tree7529e343517e1b5fbc5cfcb6661877f009fdeeb7 /sys/kern/kern_resource.c
parent64cf4e7639473a82a63723b0c5e0cfc5c25b83cc (diff)
Use LIST_ macros instead of internal field names to walk the allproc list.
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 4db024054c9..dd0cea5da63 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_resource.c,v 1.10 1999/11/05 01:18:01 mickey Exp $ */
+/* $OpenBSD: kern_resource.c,v 1.11 2000/03/03 11:31:43 art Exp $ */
/* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */
/*-
@@ -105,7 +105,7 @@ sys_getpriority(curp, v, retval)
case PRIO_USER:
if (SCARG(uap, who) == 0)
SCARG(uap, who) = curp->p_ucred->cr_uid;
- for (p = allproc.lh_first; p != 0; p = p->p_list.le_next)
+ for (p = LIST_FIRST(&allproc); p; p = LIST_NEXT(p, p_list))
if (p->p_ucred->cr_uid == SCARG(uap, who) &&
p->p_nice < low)
low = p->p_nice;
@@ -166,7 +166,7 @@ sys_setpriority(curp, v, retval)
case PRIO_USER:
if (SCARG(uap, who) == 0)
SCARG(uap, who) = curp->p_ucred->cr_uid;
- for (p = allproc.lh_first; p != 0; p = p->p_list.le_next)
+ for (p = LIST_FIRST(&allproc); p; p = LIST_NEXT(p, p_list))
if (p->p_ucred->cr_uid == SCARG(uap, who)) {
error = donice(curp, p, SCARG(uap, prio));
found++;