MFC r282747:

Use MIN from sys/param.h instead of handrolling the macro

Replace sys/types.h with sys/param.h per-style(9)

Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2015-05-16 22:36:19 +00:00
parent 0835eff68e
commit e4d7c6d253
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=283016

View File

@ -32,7 +32,7 @@ static const char rcsid[] =
"$FreeBSD$"; "$FreeBSD$";
#endif /* not lint */ #endif /* not lint */
#include <sys/types.h> #include <sys/param.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <net/if.h> #include <net/if.h>
@ -101,7 +101,6 @@ static struct sockaddr_in *sintab[] = {
static void static void
in_getaddr(const char *s, int which) in_getaddr(const char *s, int which)
{ {
#define MIN(a,b) ((a)<(b)?(a):(b))
struct sockaddr_in *sin = sintab[which]; struct sockaddr_in *sin = sintab[which];
struct hostent *hp; struct hostent *hp;
struct netent *np; struct netent *np;
@ -142,7 +141,6 @@ in_getaddr(const char *s, int which)
sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY); sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY);
else else
errx(1, "%s: bad value", s); errx(1, "%s: bad value", s);
#undef MIN
} }
static void static void