projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed typo in wrong iterator example
[pintos-anon]
/
src
/
lib
/
kernel
/
list.c
diff --git
a/src/lib/kernel/list.c
b/src/lib/kernel/list.c
index ecbb7cb6e36d6f4adab5a32cda7bfcf6db464266..e9993cbd0a5e6295d806a566b9ce4c8d76aa299c 100644
(file)
--- 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 **
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);
{
...do something with e...
list_remove (e);