|
|
Subscribe / Log in / New account

An end to implicit fall-throughs in the kernel

An end to implicit fall-throughs in the kernel

[Kernel] Posted Aug 1, 2019 15:06 UTC (Thu) by corbet

The C switch statement has, since the beginning of the language, required the use of explicit break statements to prevent execution from falling through from one case to the next. This behavior can be a useful feature, allowing for more compact code, but it can also lead to bugs. The effort to rid the kernel of implicit fall-through coding patterns came to a conclusion with the 5.3-rc2 release, where the last cases were fixed. There is a good chance that these fixes will have to be redone in the future, though.

Full Story (comments: 39)


Copyright © 2019, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds