svn commit: r184678 - head/sys/net

Bjoern A. Zeeb bz at FreeBSD.org
Wed Nov 5 03:37:26 PST 2008


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);


More information about the svn-src-head mailing list