Page MenuHomeFreeBSD

setlogincontext(): Comply to style(9)
ClosedPublic

Authored by olce on May 31 2023, 2:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 1:08 AM
Unknown Object (File)
Fri, May 3, 12:25 AM
Unknown Object (File)
Tue, Apr 23, 7:56 AM
Unknown Object (File)
Sat, Apr 20, 9:21 PM
Unknown Object (File)
Sat, Apr 20, 9:21 PM
Unknown Object (File)
Sat, Apr 20, 9:21 PM
Unknown Object (File)
Sat, Apr 20, 9:21 PM
Unknown Object (File)
Sat, Apr 20, 9:20 PM

Details

Summary

Remove indentation by inverting the big 'if (lc)' and using 'return'.
Use explicit binary operators to produce booleans.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olce requested review of this revision.May 31 2023, 2:34 PM

Update the diff following update of D40344. Same final result.

dchagin added inline comments.
lib/libutil/login_class.c
432–433

if ((flags & LOGIN_SETUMASK) != 0) {

and below

olce retitled this revision from setlogincontext(): Re-format to comply to style(9) to setlogincontext(): Comply to style(9).
olce edited the summary of this revision. (Show Details)

Explicit booleans in tests.

olce marked an inline comment as done.Jun 15 2023, 2:03 PM
olce added inline comments.
lib/libutil/login_class.c
432–433

And above as well. Thanks.

olce marked an inline comment as done.Jun 15 2023, 2:49 PM
lib/libutil/login_class.c
447

There should be a blank line between locals block and first statement.

460

Same

olce marked 2 inline comments as done.Jun 21 2023, 1:41 PM
This revision is now accepted and ready to land.Jan 26 2024, 2:31 PM
This revision was automatically updated to reflect the committed changes.