From: Godmar Back Date: Tue, 12 Sep 2006 02:32:27 +0000 (+0000) Subject: fixed typo in wrong iterator example X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0122bc0324000ff7b497d1ddce881aa4e702b34b;p=pintos-anon fixed typo in wrong iterator example --- diff --git a/src/lib/kernel/list.c b/src/lib/kernel/list.c index ecbb7cb..e9993cb 100644 --- a/src/lib/kernel/list.c +++ b/src/lib/kernel/list.c @@ -228,7 +228,7 @@ list_push_back (struct list *list, struct list_elem *elem) that a naive loop to remove the elements in a list will fail: ** DON'T DO THIS ** - for (e = list_begin (&list); e != list_end (&list); e = list_next (&list)) + for (e = list_begin (&list); e != list_end (&list); e = list_next (e)) { ...do something with e... list_remove (e);