summaryrefslogtreecommitdiff
path: root/sys/netipx/ipx.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2000-01-13 04:36:41 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2000-01-13 04:36:41 +0000
commit581cc15a6e7764705cb7de46635dbb40a193136d (patch)
tree7b6e0224b139b8bcb8bbdac4ce74dba114f34065 /sys/netipx/ipx.c
parent66165351eda7872d4c3e09d6f38d5dbacbc6552d (diff)
more KNF. remove unneeded and ancient debug code.
Diffstat (limited to 'sys/netipx/ipx.c')
-rw-r--r--sys/netipx/ipx.c52
1 files changed, 12 insertions, 40 deletions
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c
index f3f6998aa75..b7b78f422c6 100644
--- a/sys/netipx/ipx.c
+++ b/sys/netipx/ipx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipx.c,v 1.7 2000/01/11 21:10:33 fgsch Exp $ */
+/* $OpenBSD: ipx.c,v 1.8 2000/01/13 04:36:40 fgsch Exp $ */
/*-
*
@@ -100,7 +100,7 @@ ipx_control(so, cmd, data, ifp)
if (ia == (struct ipx_ifaddr *)NULL) {
ia = (struct ipx_ifaddr *)
- malloc(sizeof *ia, M_IFADDR, M_WAITOK);
+ malloc(sizeof(*ia), M_IFADDR, M_WAITOK);
if (ia == (struct ipx_ifaddr *)NULL)
return (ENOBUFS);
bzero((caddr_t)ia, sizeof(*ia));
@@ -117,8 +117,10 @@ ipx_control(so, cmd, data, ifp)
(struct sockaddr *)&ia->ia_dstaddr;
if (ifp->if_flags & IFF_BROADCAST) {
ia->ia_broadaddr.sipx_family = AF_IPX;
- ia->ia_broadaddr.sipx_len = sizeof(ia->ia_addr);
- ia->ia_broadaddr.sipx_addr.ipx_host = ipx_broadhost;
+ ia->ia_broadaddr.sipx_len =
+ sizeof(ia->ia_addr);
+ ia->ia_broadaddr.sipx_addr.ipx_host =
+ ipx_broadhost;
}
}
break;
@@ -162,7 +164,8 @@ ipx_control(so, cmd, data, ifp)
ia->ia_flags &= ~IFA_ROUTE;
}
if (ifp->if_ioctl) {
- error = (*ifp->if_ioctl)(ifp, SIOCSIFDSTADDR, (void *)ia);
+ error = (*ifp->if_ioctl)(ifp, SIOCSIFDSTADDR,
+ (void *)ia);
if (error)
return (error);
}
@@ -303,10 +306,12 @@ ipx_iaonnetof(dst)
compare = &satoipx_addr(ia->ia_dstaddr);
if (ipx_hosteq(*dst, *compare))
return (ia);
- if (ipx_neteqnn(net, ia->ia_addr.sipx_addr.ipx_net))
+ if (ipx_neteqnn(net,
+ ia->ia_addr.sipx_addr.ipx_net))
ia_maybe = ia;
} else {
- if (ipx_neteqnn(net, ia->ia_addr.sipx_addr.ipx_net))
+ if (ipx_neteqnn(net,
+ ia->ia_addr.sipx_addr.ipx_net))
return (ia);
}
}
@@ -374,36 +379,3 @@ register struct ipx_addr *addr;
printf("%s.%s%s", net, host, cport);
}
-#ifdef IPXDEBUG
-struct ipx_addr
-ipx_addr(str)
- const char *str;
-{
- struct ipx_addr ret;
-
-
- return ret;
-}
-
-char *
-ipx_ntoa(ipx)
- struct ipx_addr ipx;
-{
- static char bufs[4][4+1+(3*6)+5], *cbuf = bufs[4];
-
- if (cbuf == bufs[4])
- cbuf = bufs[0];
- else
- cbuf++;
-
- sprintf(cbuf, "%04x.%02x:%02x:%02x:%02x:%02x:%02x.%u",
- ipx.ipx_net.l_net,
- ipx.ipx_host.c_host[0], ipx.ipx_host.c_host[1],
- ipx.ipx_host.c_host[2], ipx.ipx_host.c_host[3],
- ipx.ipx_host.c_host[4], ipx.ipx_host.c_host[5],
- ipx.ipx_port);
-
- return cbuf;
-}
-
-#endif