Page MenuHomeFreeBSD

libifconfig: style(9) and license fixes
ClosedPublic

Authored by marieheleneka_gmail.com on Sep 2 2016, 8:27 PM.
Tags
None
Referenced Files
F105924028: D7764.diff
Sun, Dec 22, 5:50 PM
Unknown Object (File)
Mon, Dec 9, 8:25 PM
Unknown Object (File)
Mon, Dec 9, 5:40 AM
Unknown Object (File)
Nov 18 2024, 2:18 PM
Unknown Object (File)
Nov 10 2024, 10:58 AM
Unknown Object (File)
Nov 6 2024, 10:27 PM
Unknown Object (File)
Oct 31 2024, 2:41 PM
Unknown Object (File)
Oct 23 2024, 1:30 AM
Subscribers

Details

Summary

Make code conform to style(9), switch from BSD 3-clause to 2-clause license where possible, and consolidate duplicate 3-clause license into one.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

marieheleneka_gmail.com retitled this revision from to libifconfig: style(9) and license fixes.
marieheleneka_gmail.com updated this object.
marieheleneka_gmail.com edited the test plan for this revision. (Show Details)
marieheleneka_gmail.com added a reviewer: kp.
marieheleneka_gmail.com set the repository for this revision to rS FreeBSD src repository - subversion.
marieheleneka_gmail.com added subscribers: danfe, cem.
cem added a reviewer: cem.

LGTM modulo nit below :-).

lib/libifconfig/libifconfig_internal.c
59โ€“61

Some of these lines are probably short enough to be combined.

This revision is now accepted and ready to land.Sep 2 2016, 9:09 PM
marieheleneka_gmail.com edited edge metadata.
marieheleneka_gmail.com marked an inline comment as done.

Fixed minor nit, and fixed up examples as well.

This revision now requires review to proceed.Sep 4 2016, 1:43 PM
cem edited edge metadata.

LGTM modulo new nit below :-).

lib/libifconfig/libifconfig.c
32โ€“34

This was correct before.

Kernel include files (i.e. sys/*.h) come first; normally, include
<sys/types.h> OR <sys/param.h>, but not both.  <sys/types.h> includes
<sys/cdefs.h>, and it is okay to depend on that.

#include <sys/types.h>  /* Non-local includes in angle brackets. */

For a network program, put the network include files next.

(man 9 style)

This revision is now accepted and ready to land.Sep 4 2016, 3:44 PM
marieheleneka_gmail.com edited edge metadata.

Fixed another nit that got broken in previous fix. :)

This revision now requires review to proceed.Sep 4 2016, 4:14 PM
marieheleneka_gmail.com edited edge metadata.

Fixed missing line, and ordered includes properly in libifconfig_internal.c.

lib/libifconfig/libifconfig.h
98

danfe@ provided a bunch of style(9) feedback in the previous review: https://reviews.freebsd.org/D7742#160685

You likely want to address that here as well. The return type should be on a separate line from the function name

cem edited edge metadata.
cem added inline comments.
lib/libifconfig/libifconfig.h
98

The return type should be on a separate line from the function name

Not for prototypes, which is what these are. Lots of examples in style(9) of single-line prototypes.

This revision is now accepted and ready to land.Sep 4 2016, 4:51 PM
lib/libifconfig/libifconfig.h
98

I see a few examples involving header files in style(9), and prototypes seem to have the type on the same line. Is it safe to assume it's fine?

Prototypes may have an extra space after a tab to enable function names to line up:
     static char     *function(int _arg, const char *_arg2, struct foo *_arg3,
                         struct bar *_arg4);
     static void      usage(void);
lib/libifconfig/libifconfig.h
98

sorry, my mistake. I was just searching for the function name from the other review, and accidentally hit the prototype. I see that you have already fixed the actual function.

Just wanted to make sure danfe@'s review comments didn't get lost

lib/libifconfig/libifconfig.h
98

Yeah, the prototypes are fine as-is. :-)

This revision was automatically updated to reflect the committed changes.