3 ms·
True, however how it is used in this case leads to unnecessary opacity (I'm referring to the || mtu <= 7 part), which, once you know how usub_overflow works i
by raverbashing 11y ago
True, however how it is used in this case leads to unnecessary opacity
(I'm referring to the || mtu <= 7 part), which, once
you know how usub_overflow works is obvious what it
means, but this might not be evident and unnecessarily
complicating that snipped
Sometimes 'smart code' is not necessarily better
(I'm open to disagreement, though)
- tptacek 11y agoJust to be clear: I don't think Linus is wrong (I'm also not qualified to judge that). From what I can tell, he's like, 52.5% right. What's more interesting to me is how low-stakes this issue is. Gizmodo wrote an article about it, but really, if you understand kernel C, do you even give a shit about this code? Linus could have said "we're not using GCC builtin overflow intrinics", just like that, one line no punctuation, and the issue would have been settled. But look at this thread at the number of people who extrapolated from Linus' rant that this code was bad, ruinous, unsafe, "one size fits all" (still scratching my head about that), &c. How many of Linus' defenders actually know what he's ranting about? It looks to me like: not many. What's funny is, you actually do seem like you know what he's talking about, and even you overshot the mark with "broken". :)
- micampe 11y ago> Sometimes 'smart code' is not necessarily better I would argue that it's usually not, especially in large and long lived projects. “Everyone knows that debugging is twice as hard as writing a program”.