Page MenuHomeFreeBSD

hwpmc_mod.c: conditional and loop style
ClosedPublic

Authored by mhorne on Jun 13 2023, 5:52 PM.
Tags
None
Referenced Files
F163422851: D40515.id123226.diff
Thu, Jul 23, 2:13 AM
F163372017: D40515.id123163.diff
Wed, Jul 22, 2:55 PM
Unknown Object (File)
Wed, Jul 22, 10:33 AM
Unknown Object (File)
Tue, Jul 21, 2:55 AM
Unknown Object (File)
Sat, Jul 18, 2:02 AM
Unknown Object (File)
Wed, Jul 15, 12:02 PM
Unknown Object (File)
Tue, Jul 14, 4:36 PM
Unknown Object (File)
Jun 19 2026, 10:28 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.