3 ms·
1. Linux kernel coding style is documented here [1], and contains the line: > Do not unnecessarily use braces where a single statement will do. 2. There is no
by heinrichhartman 9y ago
1. Linux kernel coding style is documented here [1], and contains the line:
> Do not unnecessarily use braces where a single statement will do.
2. There is no built-in exception handling in C. `goto ERROR_HANDLING_CODE` is a common and well established pattern to handle exceptions in C, see e.g. [2].
[1] https://www.kernel.org/doc/html/v4.10/process/coding-style.html#placing-braces-and-spaces https://www.kernel.org/doc/html/v4.10/process/coding-style.h...
[2] https://news.ycombinator.com/item?id=3883310 https://news.ycombinator.com/item?id=3883310
- deleted 9y ago[deleted]