linked-list-good-taste icon indicating copy to clipboard operation
linked-list-good-taste copied to clipboard

Linus Torvalds' linked list argument for good taste, explained

Results 6 linked-list-good-taste issues
Sort by recently updated
recently updated
newest added

Here are some trivial commits. I believe I already sent one of these, but here it is again so it doesn't get lost.

As knowing the node to remove, why traverse the linked list instead of doing something such as: ```c target->value=target->next->value; target->next=target->next->next; ```

with `**p`: ```c static inline list_item **find_indirect(list *l, list_item *target) { list_item **p = &l->head; while (*p != target) p = &(*p)->next; return p; } ``` without `**p`: ```c static...

This project doesn't seem very active, and I created a much improved version of this that uses GitHub Pages and coded diagrams, so I think the efforts should be concentrated...

If target isn't in the list, `find_indirect` will walk off the end and dereference NULL. Example: ``` list_item item1 = { 3, NULL }; list_item item0 = { 1, &item1...