News for hackers. Stuff that matters.
Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by troydj on Wednesday October 26, 2016 @09:28AM (#12796256)
Linus' "good" version has a McCabe cyclomatic complexity of 2, whereas the "bad" version has a value of 3. So, objectively, one could argue there is improvement there (albeit small). Validation of the "good" version will be easier (e.g. code coverage testing) with fewer paths through the code. Additionally, a lower cyclomatic complexity typically implies less stress on the developer's working memory while reading code (since you don't have to consume an internal brain "register" holding the result of a conditional while following the flow of control).
Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by k__ on Wednesday October 26, 2016 @10:14AM (#12796580)
I thought the same.

On the other hand it took me a bit of time to figure out what's going on.

But I'm not C dev, so that could be the issue here.

Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by dwc on Wednesday October 26, 2016 @11:51AM (#12797481)
Serious question: after figuring it out, did you have a somewhat better grasp of linked list mechanics than before?
Re:Applying the Linus Torvalds “Good Taste” Coding Requirement by rocqua on Wednesday October 26, 2016 @12:38PM (#12797960)
I had a better grasp of how to work with them (am not who you replied too).

I never had to build my own linked list though. I never took those basic courses.