4 ms·
This isn't an API though. 'head' is fine being implied, and if 'entry' doesn't exist, why is it being passed in ? That's a further code 'smell' to follow up. S
by mobiuscog 10y ago
This isn't an API though. 'head' is fine being implied, and if 'entry' doesn't exist, why is it being passed in ? That's a further code 'smell' to follow up.
Sure, you need to be massively defensive if you're writing an API or boundary, but within an owned codebase, if you're eliminating edge-cases, you should follow them all the way up.
tl;dr if you're calling remove_list_entry, only do so if you have an entry.
Or course, I'm not Linus, so I have no idea of his thought process.