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)
Thu, Nov 20, 7:45 PM
Unknown Object (File)
Thu, Nov 20, 7:42 PM
Unknown Object (File)
Thu, Nov 20, 7:39 PM
Unknown Object (File)
Thu, Nov 20, 7:38 PM
Unknown Object (File)
Thu, Nov 20, 7:38 PM
Unknown Object (File)
Thu, Nov 20, 7:24 PM
Unknown Object (File)
Tue, Nov 18, 2:53 PM
Unknown Object (File)
Mon, Nov 17, 8:38 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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

usr.sbin/kldxref/ef.c
121

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

usr.sbin/kldxref/ef_obj.c
139

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

usr.sbin/kldxref/ef.c
83

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

297

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

304

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.