Page MenuHomeFreeBSD

sysctl: Misc code cleanup
ClosedPublic

Authored by freqlabs on Oct 17 2020, 5:10 PM.
Tags
None
Referenced Files
F81943318: D26832.diff
Tue, Apr 23, 1:33 PM
Unknown Object (File)
Mar 22 2024, 9:58 PM
Unknown Object (File)
Mar 22 2024, 9:58 PM
Unknown Object (File)
Mar 22 2024, 9:58 PM
Unknown Object (File)
Mar 22 2024, 9:57 PM
Unknown Object (File)
Mar 22 2024, 9:57 PM
Unknown Object (File)
Mar 9 2024, 5:10 AM
Unknown Object (File)
Feb 11 2024, 11:10 PM

Details

Summary
  • Use defined SYS_SYSCTL names
  • Use memcmp instead of explicit loop
  • Use NULL instead of 0 for pointer value
  • Use __FBSDID
  • Reformat, improve comments in parse()

No functional changes.

Sponsored by: iXsystems, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Separated kern_sysctl changes to a different patch.
Use defined CTL_SYSCTL oid names.

Modulo the blank line thing, this looks good. It's arguably two different commits, but it's so small splitting it further at this stage likely has little benefit.

sbin/sysctl/sysctl.c
368 ↗(On Diff #78415)

Nit: in most of the tree we don't have a blank line separating the comment from the code like this. Here and below

This revision is now accepted and ready to land.Oct 23 2020, 8:09 PM
In D26832#600476, @imp wrote:

Modulo the blank line thing, this looks good. It's arguably two different commits, but it's so small splitting it further at this stage likely has little benefit.

I have it as 5 separate commits in my git tree but putting up separate reviews for each one on phabricator is not practical. I plan to do one commit to svn as well to avoid confusing phabricator.

freqlabs edited the summary of this revision. (Show Details)

Removed blank lines following section comments.

This revision now requires review to proceed.Oct 23 2020, 8:25 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 24 2020, 4:05 PM
Closed by commit rS367006: sysctl: Misc code cleanup (authored by freqlabs). · Explain Why
This revision was automatically updated to reflect the committed changes.