MFC after: 1 week
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
jhb@ prefers such code to be written as
error = XXX(); if (error != 0) return (error);
Comment Actions
For me it's a minor point, but I prefer to write things like:
if ((error = XXX) != 0)
when that fits on a single line, because I find C too verbose on this occasion: It cannot express very concisely to return from the current function with a given value if it is non-zero, without using macros. I wish we could settle on a "global", well-known macro to do exactly that.
Now, if you all prefer a separate line, of course I'll adopt that convention.
I will adapt the code above to this end at commit time.