Cleanup whitespace by (mostly) adding missing curly braces
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
This is not a whitespace cleanup (with the exception of the two trailing spaces in the shell scripts). Single-statement if and for statements are allowed to omit the braces per style(9); in fact it's extremely common to omit them in FreeBSD code.
usr.sbin/bsdinstall/partedit/partedit_x86.c | ||
---|---|---|
106–108 | This is a style violation |
Well it kind of is, in that I didn't have to add the space after the closing paren.. I prefer to add the curly braces and be more explicit
You should revert adding the curly braces in the first place. They are not required here, it's perfectly correct to omit them. And in fact style(9) says not to mix within a function but you're now mixing them.
It's pointless churn that introduces some stale violations unless you go and change other lines too in the same functions. Just delete the trailing spaces.
I'll also note it really sucks to have patches in Phabricator without full context as requested by https://wiki.freebsd.org/Phabricator#Create_a_Revision_via_Web_Interface, especially for something like this where context is vital to understanding if there are style violations introduced
usr.sbin/bsdinstall/partedit/partedit_x86.c | ||
---|---|---|
101 | An example of one that had no whitespace issues in the same function as one that did and thus leads to a style violation with your patch applied due to mixing style |