Page MenuHomeFreeBSD

Cleanup kldxref sources
ClosedPublic

Authored by mhorne063_gmail.com on Jan 16 2018, 10:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 3 2024, 9:55 AM
Unknown Object (File)
Jan 3 2024, 9:54 AM
Unknown Object (File)
Dec 20 2023, 2:39 AM
Unknown Object (File)
Dec 16 2023, 9:43 PM
Unknown Object (File)
Jul 9 2023, 12:14 AM
Unknown Object (File)
Mar 25 2023, 4:19 AM
Unknown Object (File)
Mar 25 2023, 4:19 AM
Unknown Object (File)
Mar 25 2023, 4:18 AM
Subscribers

Details

Summary

There are some style inconsistencies in the kldxref source files, this patch should fix most of them in accordance to style(9)
Some of these were discussed on a previous revision here.
Quick summary:

  • Use designated initializers for structs
  • Always use bracketed return style
  • No initialization in declarations
  • Align function prototype names
  • Remove old commented code/unused imports

Diff Detail

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

Event Timeline

usr.sbin/kldxref/ef.c
121 ↗(On Diff #38068)

The alignment here is correct, phabricator just doesn't seem to display it properly.

usr.sbin/kldxref/ef_obj.c
139 ↗(On Diff #38068)

Same as above, alignment doesn't display properly in phabricator.

usr.sbin/kldxref/ef.c
83 ↗(On Diff #38068)

Can you extract the change of the return value to Elf_Off ?

296 ↗(On Diff #38068)

Perhaps use %jx and (uintmax_t)ef_get_offset().

304 ↗(On Diff #38068)

if (error != 0)

Use explicit conditions (error != 0).
Remove the change to ef_get_offset() return type for another patch.

This revision is now accepted and ready to land.Jan 17 2018, 7:00 PM

Changed pointer justification in the struct at the beginning of ef.c

This revision now requires review to proceed.Jan 17 2018, 7:50 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 17 2018, 8:00 PM
Closed by commit rS328094: kldxref: improve style(9) (authored by emaste). · Explain Why
This revision was automatically updated to reflect the committed changes.