Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net in tundetach(), error is only used #ifdef _MODULE so...



details:   https://anonhg.NetBSD.org/src/rev/da02a8d869b0
branches:  trunk
changeset: 449828:da02a8d869b0
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Mar 25 10:04:48 2019 +0000

description:
in tundetach(), error is only used #ifdef _MODULE so wrap its declaration.

diffstat:

 sys/net/if_tun.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r af84acb46679 -r da02a8d869b0 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Mon Mar 25 09:59:59 2019 +0000
+++ b/sys/net/if_tun.c  Mon Mar 25 10:04:48 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.154 2019/03/25 09:07:24 pgoyette Exp $    */
+/*     $NetBSD: if_tun.c,v 1.155 2019/03/25 10:04:48 pgoyette Exp $    */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.154 2019/03/25 09:07:24 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.155 2019/03/25 10:04:48 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -142,7 +142,9 @@
 static int
 tundetach(void)
 {
-       int error = 0;
+#ifdef _MODULE
+       int error;
+#endif
 
        if_clone_detach(&tun_cloner);
 #ifdef _MODULE



Home | Main Index | Thread Index | Old Index