Page MenuHomeFreeBSD

hwpmc_mod.c: conditional and loop style
ClosedPublic

Authored by mhorne on Jun 13 2023, 5:52 PM.
Tags
None
Referenced Files
F115040680: D40515.diff
Sat, Apr 19, 10:03 PM
F115033457: D40515.diff
Sat, Apr 19, 8:21 PM
Unknown Object (File)
Mar 20 2025, 9:58 PM
Unknown Object (File)
Mar 7 2025, 1:20 AM
Unknown Object (File)
Mar 2 2025, 10:00 AM
Unknown Object (File)
Feb 17 2025, 4:24 AM
Unknown Object (File)
Jan 26 2025, 9:17 PM
Unknown Object (File)
Jan 25 2025, 6:14 PM
Subscribers

Details

Summary
  • Explicitly check the value in conditional statements, per style(9)
  • Add braces around more loops and conditionals, wherever it appears (to me) to aid legibility
  • Expand some assignments within if statements
  • Fix formatting around list-type FOREACH macros

Diff Detail

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

Event Timeline

jkoshy added inline comments.
sys/dev/hwpmc/hwpmc_mod.c
3037–3038

You could save an indentation level by not having an 'else' clause.

This revision is now accepted and ready to land.Jun 14 2023, 9:53 AM
This revision was automatically updated to reflect the committed changes.
mhorne marked an inline comment as done.