summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2004-12-26 21:22:11 +0000
committermiod <miod@openbsd.org>2004-12-26 21:22:11 +0000
commit9d08f8e56428da94db79b31da31f4e37cb4022b7 (patch)
tree85404d1033f1e95cb08994035802c1e568059230 /sys/kern/tty.c
parentRemove duplicate definition of LONG_DOUBLE_TYPE_SIZE, and shrink WINT_TYPE (diff)
downloadwireguard-openbsd-9d08f8e56428da94db79b31da31f4e37cb4022b7.tar.xz
wireguard-openbsd-9d08f8e56428da94db79b31da31f4e37cb4022b7.zip
Use list and queue macros where applicable to make the code easier to read;
no change in compiler assembly output.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 4af17dea526..7542b035602 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.67 2004/11/18 15:10:24 markus Exp $ */
+/* $OpenBSD: tty.c,v 1.68 2004/12/26 21:22:13 miod Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -2089,11 +2089,11 @@ ttyinfo(tp)
ttyprintf(tp, "not a controlling terminal\n");
else if (tp->t_pgrp == NULL)
ttyprintf(tp, "no foreground process group\n");
- else if ((p = tp->t_pgrp->pg_members.lh_first) == 0)
+ else if ((p = LIST_FIRST(&tp->t_pgrp->pg_members)) == NULL)
ttyprintf(tp, "empty foreground process group\n");
else {
/* Pick interesting process. */
- for (pick = NULL; p != 0; p = p->p_pglist.le_next)
+ for (pick = NULL; p != 0; p = LIST_NEXT(p, p_pglist))
if (proc_compare(pick, p))
pick = p;