Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2008 11:37:26 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184678 - head/sys/net
Message-ID:  <200811051137.mA5BbQ8S025701@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Wed Nov  5 11:37:26 2008
New Revision: 184678
URL: http://svn.freebsd.org/changeset/base/184678

Log:
  Do only define the variable if either INET or INET6 is defined.
  
  To prevent it from compiling without INET and INET6 we should put
  an explicit #error in there like we have in other files,
  but not rely on an unused variable.
  
  MFC after:	2 months

Modified:
  head/sys/net/if_gif.c

Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c	Wed Nov  5 11:06:10 2008	(r184677)
+++ head/sys/net/if_gif.c	Wed Nov  5 11:37:26 2008	(r184678)
@@ -207,7 +207,9 @@ static void
 gif_clone_destroy(ifp)
 	struct ifnet *ifp;
 {
+#if defined(INET) || defined(INET6)
 	int err;
+#endif
 	struct gif_softc *sc = ifp->if_softc;
 
 	mtx_lock(&gif_mtx);



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