From ba4257b89dd38fde047cfdbfb00b3ab296abe841 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 23 Oct 2006 09:27:37 +0000 Subject: [PATCH 1/1] Rather than making static declarations global, get rid of the extern. Pointed-out-by: dillon Additional-clue: corecode --- sys/net/rtsock.c | 6 +++--- sys/netproto/atalk/at_proto.c | 6 +++--- sys/netproto/ipx/ipx_proto.c | 6 +++--- sys/netproto/natm/natm_proto.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 95bdfaa2c8..8a58ce5b9f 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -82,7 +82,7 @@ * * @(#)rtsock.c 8.7 (Berkeley) 10/12/95 * $FreeBSD: src/sys/net/rtsock.c,v 1.44.2.11 2002/12/04 14:05:41 ru Exp $ - * $DragonFly: src/sys/net/rtsock.c,v 1.34 2006/09/30 22:06:04 swildner Exp $ + * $DragonFly: src/sys/net/rtsock.c,v 1.35 2006/10/23 09:27:37 swildner Exp $ */ #include "opt_sctp.h" @@ -1320,7 +1320,7 @@ SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock, ""); * Definitions of protocols supported in the ROUTE domain. */ -extern struct domain routedomain; /* or at least forward */ +static struct domain routedomain; /* or at least forward */ static struct protosw routesw[] = { { SOCK_RAW, &routedomain, 0, PR_ATOMIC|PR_ADDR, @@ -1331,7 +1331,7 @@ static struct protosw routesw[] = { } }; -struct domain routedomain = { +static struct domain routedomain = { PF_ROUTE, "route", NULL, NULL, NULL, routesw, &routesw[(sizeof routesw)/(sizeof routesw[0])], }; diff --git a/sys/netproto/atalk/at_proto.c b/sys/netproto/atalk/at_proto.c index 1965bba969..b596826d5b 100644 --- a/sys/netproto/atalk/at_proto.c +++ b/sys/netproto/atalk/at_proto.c @@ -20,7 +20,7 @@ * +1-313-763-0525 * netatalk@itd.umich.edu * - * $DragonFly: src/sys/netproto/atalk/at_proto.c,v 1.5 2006/09/30 22:06:04 swildner Exp $ + * $DragonFly: src/sys/netproto/atalk/at_proto.c,v 1.6 2006/10/23 09:27:37 swildner Exp $ */ #include @@ -36,7 +36,7 @@ #include "ddp_var.h" #include "at_extern.h" -extern struct domain atalkdomain; +static struct domain atalkdomain; static struct protosw atalksw[] = { { @@ -58,7 +58,7 @@ static struct protosw atalksw[] = { }, }; -struct domain atalkdomain = { +static struct domain atalkdomain = { AF_APPLETALK, "appletalk", NULL, NULL, NULL, atalksw, &atalksw[sizeof(atalksw)/sizeof(atalksw[0])], SLIST_ENTRY_INITIALIZER, diff --git a/sys/netproto/ipx/ipx_proto.c b/sys/netproto/ipx/ipx_proto.c index 852e6941be..8d35981919 100644 --- a/sys/netproto/ipx/ipx_proto.c +++ b/sys/netproto/ipx/ipx_proto.c @@ -34,7 +34,7 @@ * @(#)ipx_proto.c * * $FreeBSD: src/sys/netipx/ipx_proto.c,v 1.15 1999/08/28 00:49:41 peter Exp $ - * $DragonFly: src/sys/netproto/ipx/ipx_proto.c,v 1.6 2006/09/30 22:06:04 swildner Exp $ + * $DragonFly: src/sys/netproto/ipx/ipx_proto.c,v 1.7 2006/10/23 09:27:37 swildner Exp $ */ #include "opt_ipx.h" @@ -53,7 +53,7 @@ #include "ipx_var.h" #include "spx.h" -extern struct domain ipxdomain; +static struct domain ipxdomain; static struct pr_usrreqs nousrreqs; /* @@ -103,7 +103,7 @@ static struct protosw ipxsw[] = { #endif }; -struct domain ipxdomain = +static struct domain ipxdomain = { AF_IPX, "network systems", 0, 0, 0, ipxsw, &ipxsw[sizeof(ipxsw)/sizeof(ipxsw[0])], SLIST_ENTRY_INITIALIZER, rn_inithead, 16, sizeof(struct sockaddr_ipx)}; diff --git a/sys/netproto/natm/natm_proto.c b/sys/netproto/natm/natm_proto.c index ff2f4c1da3..1b149828d1 100644 --- a/sys/netproto/natm/natm_proto.c +++ b/sys/netproto/natm/natm_proto.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/netnatm/natm_proto.c,v 1.4.2.2 2000/08/03 18:56:28 peter Exp $ - * $DragonFly: src/sys/netproto/natm/natm_proto.c,v 1.9 2006/09/30 22:06:04 swildner Exp $ + * $DragonFly: src/sys/netproto/natm/natm_proto.c,v 1.10 2006/10/23 09:27:37 swildner Exp $ */ /* @@ -53,7 +53,7 @@ #include "natm.h" -extern struct domain natmdomain; +static struct domain natmdomain; static struct protosw natmsw[] = { { SOCK_STREAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED, @@ -100,7 +100,7 @@ static struct protosw natmsw[] = { }, }; -struct domain natmdomain = { +static struct domain natmdomain = { AF_NATM, "natm", natm_init, NULL, NULL, natmsw, &natmsw[sizeof(natmsw)/sizeof(natmsw[0])], }; -- 2.41.0