Module Name: src
Committed By: martin
Date: Sat Oct 19 18:39:31 UTC 2013
Modified Files:
src/sys/net: if.c
Log Message:
Ifdef a variable like its use
To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/net/if.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.267 src/sys/net/if.c:1.268
--- src/sys/net/if.c:1.267 Sun Oct 6 01:21:24 2013
+++ src/sys/net/if.c Sat Oct 19 18:39:30 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.267 2013/10/06 01:21:24 christos Exp $ */
+/* $NetBSD: if.c,v 1.268 2013/10/19 18:39:30 martin Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.267 2013/10/06 01:21:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.268 2013/10/19 18:39:30 martin Exp $");
#include "opt_inet.h"
@@ -1323,7 +1323,10 @@ link_rtrequest(int cmd, struct rtentry *
void
if_link_state_change(struct ifnet *ifp, int link_state)
{
- int old_link_state, s;
+ int s;
+#ifdef DEBUG
+ int old_link_state;
+#endif
s = splnet();
if (ifp->if_link_state == link_state) {
@@ -1331,7 +1334,9 @@ if_link_state_change(struct ifnet *ifp,
return;
}
+#ifdef DEBUG
old_link_state = ifp->if_link_state;
+#endif
ifp->if_link_state = link_state;
#ifdef DEBUG
log(LOG_DEBUG, "%s: link state %s (was %s)\n", ifp->if_xname,