Added the safe version of the list_for_each function.

This commit is contained in:
Jaroslav Kysela 2001-02-13 12:53:19 +00:00
parent db53ac9b41
commit 6ea4260c1c
6 changed files with 35 additions and 28 deletions

View file

@ -753,7 +753,7 @@ int inet_pending_handler(waiter_t *waiter, unsigned short events)
inet_pending_t *pdata;
client_t *client;
uint32_t cookie;
struct list_head *item, *next;
struct list_head *item;
int remove = 0;
if (events & POLLHUP)
remove = 1;
@ -775,7 +775,7 @@ int inet_pending_handler(waiter_t *waiter, unsigned short events)
return 0;
}
list_for_each(item, next, &inet_pendings) {
list_for_each(item, &inet_pendings) {
pdata = list_entry(item, inet_pending_t, list);
if (pdata->cookie == cookie)
goto found;