Revision b933281e

View differences:

lib/event.c
125 125
int
126 126
ev_run_list(event_list *l)
127 127
{
128
  node *n, *p;
128
  node *n;
129 129
  list tmp_list;
130 130

  
131 131
  init_list(&tmp_list);
132 132
  add_tail_list(&tmp_list, l);
133 133
  init_list(l);
134
  WALK_LIST_DELSAFE(n, p, tmp_list)
134
  WALK_LIST_FIRST(n, tmp_list)
135 135
    {
136 136
      event *e = SKIP_BACK(event, n, n);
137 137
      ev_run(e);
lib/lists.h
37 37
				n=(void *)((NODE (n))->next))
38 38
#define WALK_LIST_DELSAFE(n,nxt,list) \
39 39
     for(n=HEAD(list); nxt=(void *)((NODE (n))->next); n=(void *) nxt)
40
/* WALK_LIST_FIRST supposes that called code removes each processed node */
41
#define WALK_LIST_FIRST(n,list) \
42
     while(n=HEAD(list), (NODE (n))->next)
40 43
#define WALK_LIST_BACKWARDS(n,list) for(n=TAIL(list);(NODE (n))->prev; \
41 44
				n=(void *)((NODE (n))->prev))
42 45
#define WALK_LIST_BACKWARDS_DELSAFE(n,prv,list) \

Also available in: Unified diff