Page MenuHomeFreeBSD

hwpmc_mod.c: conditional and loop style
ClosedPublic

Authored by mhorne on Jun 13 2023, 5:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 16, 2:25 PM
Unknown Object (File)
Sat, Jul 5, 9:46 PM
Unknown Object (File)
Sat, Jul 5, 5:09 AM
Unknown Object (File)
Fri, Jul 4, 7:31 PM
Unknown Object (File)
Fri, Jul 4, 12:38 AM
Unknown Object (File)
Sat, Jun 21, 8:56 PM
Unknown Object (File)
Jun 17 2025, 10:31 PM
Unknown Object (File)
Jun 15 2025, 8:39 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 52024
Build 48915: arc lint + arc unit

Event Timeline

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

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.