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
Unknown Object (File)
Sat, Apr 6, 3:15 PM
Unknown Object (File)
Sat, Mar 30, 1:50 AM
Unknown Object (File)
Mar 22 2024, 6:59 PM
Unknown Object (File)
Mar 22 2024, 6:59 PM
Unknown Object (File)
Mar 22 2024, 6:59 PM
Unknown Object (File)
Mar 22 2024, 6:59 PM
Unknown Object (File)
Mar 22 2024, 12:47 PM
Unknown Object (File)
Mar 22 2024, 12:47 PM
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 Not Applicable
Unit
Tests Not Applicable

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
58–60 ↗(On Diff #19994)

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 ↗(On Diff #20035)

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 ↗(On Diff #20039)

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 ↗(On Diff #20039)

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 ↗(On Diff #20039)

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 ↗(On Diff #20039)

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 ↗(On Diff #20039)

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

This revision was automatically updated to reflect the committed changes.