summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-11-29 22:22:58 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-11-29 22:22:58 +0000
commite24a609b20159d5bd5f0ceb17be9c255edb9a807 (patch)
treefd56efba1487862bb85f0dcfba5833aad8d7990b /libexec
parent4f17b0a0ef7dd070e1d6a541e640190c7dbcffac (diff)
back out TAILQ_FOREACH - not portable, deraadt@
Diffstat (limited to 'libexec')
-rw-r--r--libexec/talkd/table.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c
index 8238d4d1e1a..d99f6482b4a 100644
--- a/libexec/talkd/table.c
+++ b/libexec/talkd/table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table.c,v 1.5 1999/11/29 22:18:19 d Exp $ */
+/* $OpenBSD: table.c,v 1.6 1999/11/29 22:22:57 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.5 1999/11/29 22:18:19 d Exp $";
+static char rcsid[] = "$Id: table.c,v 1.6 1999/11/29 22:22:57 d Exp $";
#endif /* not lint */
/*
@@ -98,7 +98,7 @@ find_match(request)
current_time = tp.tv_sec;
if (debug)
print_request("find_match", request);
- TAILQ_FOREACH(ptr, &table, list) {
+ for (ptr = table.tqh_first; ptr != NULL; ptr = ptr->list.tqe_next) {
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);
- TAILQ_FOREACH(ptr, &table, list) {
+ for (ptr = table.tqh_first; ptr != NULL; ptr = ptr->list.tqe_next) {
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);
- TAILQ_FOREACH(ptr, &table, list) {
+ for (ptr = table.tqh_first; ptr != NULL; ptr = ptr->list.tqe_next) {
if (ptr->request.id_num == id_num)
break;
if (debug)