Page MenuHomeFreeBSD

Cleanup kldxref sources
ClosedPublic

Authored by mhorne063_gmail.com on Jan 16 2018, 10:36 PM.
Tags
None
Referenced Files
F169399850: D13943.id.diff
Tue, Sep 1, 10:36 AM
Unknown Object (File)
Mon, Aug 31, 8:08 AM
Unknown Object (File)
Mon, Aug 31, 8:07 AM
Unknown Object (File)
Sun, Aug 30, 9:37 AM
Unknown Object (File)
Sun, Aug 30, 9:07 AM
Unknown Object (File)
Sun, Aug 30, 9:06 AM
Unknown Object (File)
Sun, Aug 30, 7:58 AM
Unknown Object (File)
Sun, Aug 30, 6:28 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.