Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 May 2015 04:54:57 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r282747 - head/sbin/ifconfig
Message-ID:  <201505110454.t4B4svut001346@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Mon May 11 04:54:56 2015
New Revision: 282747
URL: https://svnweb.freebsd.org/changeset/base/282747

Log:
  Use MIN from sys/param.h instead of handrolling the macro
  
  Replace sys/types.h with sys/param.h per-style(9)
  
  MFC after: 3 days
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sbin/ifconfig/af_inet.c

Modified: head/sbin/ifconfig/af_inet.c
==============================================================================
--- head/sbin/ifconfig/af_inet.c	Mon May 11 01:33:34 2015	(r282746)
+++ head/sbin/ifconfig/af_inet.c	Mon May 11 04:54:56 2015	(r282747)
@@ -32,7 +32,7 @@ static const char rcsid[] =
   "$FreeBSD$";
 #endif /* not lint */
 
-#include <sys/types.h>
+#include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <net/if.h>
@@ -100,7 +100,6 @@ static struct sockaddr_in *sintab[] = {
 static void
 in_getaddr(const char *s, int which)
 {
-#define	MIN(a,b)	((a)<(b)?(a):(b))
 	struct sockaddr_in *sin = sintab[which];
 	struct hostent *hp;
 	struct netent *np;
@@ -141,7 +140,6 @@ in_getaddr(const char *s, int which)
 		sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY);
 	else
 		errx(1, "%s: bad value", s);
-#undef MIN
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505110454.t4B4svut001346>