Conversation

Takashi Sakamoto (坂本 貴史)

https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git/tree/drivers/firewire/core-topology.c?h=v6.16#n263

```
235 list_for_each_entry(node, &list, link) {
...
245 list_add_tail(&child->link, &list);
248 ...
249 }
```

Oops...
1
0
0

@takaswie

It is very easy to get things wrong with the list API. My favorite property is that the list_add arguments can be swapped and the compiler doesn't complain at all. It even works as long you have only one element at the time...

0
0
0