summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-03-28 00:32:12 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-03-28 00:32:12 +0000
commit1682209d2280b7c51c61607fe7cb5e272b7ded92 (patch)
tree8fcd2b6f34fdee653fb7dc1f67f9c6884376de1c /sys/netinet
parentef334395d0445f4d18ee8bba08b4532efdca84fc (diff)
Unfortunately the satosin, sintosa, ifatoia, satosin6, sin6tosa,
ifatoia6 macros do not check the source type. They just cast anything. Remove needless casts and do not use those macros if the source type does not match. Remove duplicate defines. No binary change. OK kettenis@ krw@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c4
-rw-r--r--sys/netinet/in_pcb.c6
-rw-r--r--sys/netinet/ip_input.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 5290899c4e4..d1d849be42b 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.98 2013/03/22 01:41:12 tedu Exp $ */
+/* $OpenBSD: if_ether.c,v 1.99 2013/03/28 00:32:11 bluhm Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -829,7 +829,7 @@ arplookup(u_int32_t addr, int create, int proxy, u_int tableid)
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = addr;
sin.sin_other = proxy ? SIN_PROXY : 0;
- rt = rtalloc1(sintosa(&sin), create, tableid);
+ rt = rtalloc1((struct sockaddr *)&sin, create, tableid);
if (rt == 0)
return (0);
rt->rt_refcnt--;
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 0ebac884c68..cc83efeafbf 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.131 2013/02/05 19:09:52 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.132 2013/03/28 00:32:11 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -810,7 +810,7 @@ in_selectsrc(struct sockaddr_in *sin, struct route *ro, int soopts,
*errorp = EADDRNOTAVAIL;
return NULL;
}
- return satosin(&ia->ia_addr);
+ return (&ia->ia_addr);
}
}
/*
@@ -863,7 +863,7 @@ in_selectsrc(struct sockaddr_in *sin, struct route *ro, int soopts,
return NULL;
}
}
- return satosin(&ia->ia_addr);
+ return (&ia->ia_addr);
}
void
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index e55f1f2d14c..3d8f38a3137 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.202 2013/03/26 13:19:26 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.203 2013/03/28 00:32:11 bluhm Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -1297,7 +1297,7 @@ ip_weadvertise(u_int32_t addr, u_int rtableid)
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = addr;
sin.sin_other = SIN_PROXY;
- rt = rtalloc1(sintosa(&sin), 0, rtableid);
+ rt = rtalloc1((struct sockaddr *)&sin, 0, rtableid);
if (rt == 0)
return 0;