Constify ipx_zeronet, ipx_zerohost, ipx_broadnet, ipx_broadhost.
Remove 'allones' since the values of the broadcast network and host variables are set statically.
This commit is contained in:
parent
7665f445d0
commit
05b4b08b61
@ -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;
|
||||
|
@ -72,10 +72,10 @@ extern struct pr_usrreqs ripx_usrreqs;
|
||||
extern struct sockaddr_ipx ipx_netmask;
|
||||
extern struct sockaddr_ipx ipx_hostmask;
|
||||
|
||||
extern union ipx_net ipx_zeronet;
|
||||
extern union ipx_host ipx_zerohost;
|
||||
extern union ipx_net ipx_broadnet;
|
||||
extern union ipx_host ipx_broadhost;
|
||||
extern const union ipx_net ipx_zeronet;
|
||||
extern const union ipx_host ipx_zerohost;
|
||||
extern const union ipx_net ipx_broadnet;
|
||||
extern const union ipx_host ipx_broadhost;
|
||||
|
||||
struct ifnet;
|
||||
struct ipx_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user