summaryrefslogtreecommitdiffstats
path: root/sys/netipx/ipx_input.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-12-30 16:56:07 +0000
committerrwatson <rwatson@FreeBSD.org>2004-12-30 16:56:07 +0000
commita0561a7c8f5afef4fe44d26d56b9e826555ece3a (patch)
treeec55bc0d0b5e2b6edf3c1b0657564c62d8a8741d /sys/netipx/ipx_input.c
parent0e408bd3816e8ecfa94a299f09f176b2a4979f8d (diff)
downloadFreeBSD-src-a0561a7c8f5afef4fe44d26d56b9e826555ece3a.zip
FreeBSD-src-a0561a7c8f5afef4fe44d26d56b9e826555ece3a.tar.gz
Constify ipx_zeronet, ipx_zerohost, ipx_broadnet, ipx_broadhost.
Remove 'allones' since the values of the broadcast network and host variables are set statically.
Diffstat (limited to 'sys/netipx/ipx_input.c')
-rw-r--r--sys/netipx/ipx_input.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c
index a511a4f..9e12ac6 100644
--- a/sys/netipx/ipx_input.c
+++ b/sys/netipx/ipx_input.c
@@ -72,17 +72,18 @@ static int ipxnetbios = 0;
SYSCTL_INT(_net_ipx, OID_AUTO, ipxnetbios, CTLFLAG_RW,
&ipxnetbios, 0, "");
-union ipx_net ipx_zeronet;
-union ipx_host ipx_zerohost;
+const union ipx_net ipx_zeronet;
+const union ipx_host ipx_zerohost;
-union ipx_net ipx_broadnet;
-union ipx_host ipx_broadhost;
+const union ipx_net ipx_broadnet = { .s_net[0] = 0xffff,
+ .s_net[1] = 0xffff };
+const union ipx_host ipx_broadhost = { .s_host[0] = 0xffff,
+ .s_host[1] = 0xffff,
+ .s_host[2] = 0xffff };
struct ipxstat ipxstat;
struct sockaddr_ipx ipx_netmask, ipx_hostmask;
-static u_short allones[] = {-1, -1, -1};
-
struct ipxpcb ipxpcb;
struct ipxpcb ipxrawpcb;
@@ -103,8 +104,6 @@ static void ipxintr(struct mbuf *m);
void
ipx_init()
{
- ipx_broadnet = *(union ipx_net *)allones;
- ipx_broadhost = *(union ipx_host *)allones;
read_random(&ipx_pexseq, sizeof ipx_pexseq);
ipxpcb.ipxp_next = ipxpcb.ipxp_prev = &ipxpcb;
OpenPOWER on IntegriCloud