Page MenuHomeFreeBSD

sysctl: Misc code cleanup
ClosedPublic

Authored by freqlabs on Oct 17 2020, 5:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 12:34 PM
Unknown Object (File)
Oct 25 2024, 5:38 AM
Unknown Object (File)
Oct 25 2024, 5:38 AM
Unknown Object (File)
Oct 25 2024, 5:38 AM
Unknown Object (File)
Oct 25 2024, 5:38 AM
Unknown Object (File)
Oct 25 2024, 5:38 AM
Unknown Object (File)
Oct 25 2024, 5:24 AM
Unknown Object (File)
Oct 10 2024, 2:26 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.