diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-11-29 22:18:20 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-11-29 22:18:20 +0000 |
commit | 4f17b0a0ef7dd070e1d6a541e640190c7dbcffac (patch) | |
tree | 675c795a8ca3c8f9d7eb3091320cb2f8328e4361 | |
parent | f12b5fbe71261345170beeade2635553a5176ef2 (diff) |
use TAILQ_FOREACH, ok mickey@
-rw-r--r-- | libexec/talkd/table.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index b528907f784..8238d4d1e1a 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table.c,v 1.4 1998/07/10 08:06:19 deraadt Exp $ */ +/* $OpenBSD: table.c,v 1.5 1999/11/29 22:18:19 d Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)table.c 5.7 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: table.c,v 1.4 1998/07/10 08:06:19 deraadt Exp $"; +static char rcsid[] = "$Id: table.c,v 1.5 1999/11/29 22:18:19 d Exp $"; #endif /* not lint */ /* @@ -98,7 +98,7 @@ find_match(request) current_time = tp.tv_sec; if (debug) print_request("find_match", request); - for (ptr = table.tqh_first; ptr != NULL; ptr = ptr->list.tqe_next) { + TAILQ_FOREACH(ptr, &table, list) { if ((current_time - ptr->time) > MAX_LIFE) { /* the entry is too old */ if (debug) @@ -139,7 +139,7 @@ find_request(request) */ if (debug) print_request("find_request", request); - for (ptr = table.tqh_first; ptr != NULL; ptr = ptr->list.tqe_next) { + TAILQ_FOREACH(ptr, &table, list) { if ((current_time - ptr->time) > MAX_LIFE) { /* the entry is too old */ if (debug) @@ -213,7 +213,7 @@ delete_invite(id_num) if (debug) syslog(LOG_DEBUG, "delete_invite(%d)", id_num); - for (ptr = table.tqh_first; ptr != NULL; ptr = ptr->list.tqe_next) { + TAILQ_FOREACH(ptr, &table, list) { if (ptr->request.id_num == id_num) break; if (debug) |