News for hackers. Stuff that matters.
Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by marcell on Wednesday October 26, 2016 @04:02AM (#12794728)
This version is more clear for a human, but it does contain duplicate logic.

This line:

          head = head->next;
is another form of this line:

              prev->next = prev->next->next;
Both delete by setting "->next". Code duplication is a common source of bugs, and that's the rationale behind Linus's version, which eliminates duped code.
Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by akkartik on Wednesday October 26, 2016 @02:14PM (#12798948)
See my comments regarding blindly removing "duplication" at https://news.ycombinator.com/item?id=12798796 (point 4)
Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by alkoumpa on Wednesday October 26, 2016 @02:31PM (#12799120)
Not only is it duplicate, it also contains nasty "behavior". If prev->next equals NULL then dereferencing this would result in segfault, so in this case another if statement is required.