summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-04-18 19:38:20 +0000
committerru <ru@FreeBSD.org>2004-04-18 19:38:20 +0000
commit40fb1e73cdf47ac5217b07989b72da90ecb11da6 (patch)
tree2887e64076096b811e4f4487cb8f0a8409244ea1 /sys/net
parent9540f2e5933db7e71d347e604502be84c5d562ff (diff)
downloadFreeBSD-src-40fb1e73cdf47ac5217b07989b72da90ecb11da6.zip
FreeBSD-src-40fb1e73cdf47ac5217b07989b72da90ecb11da6.tar.gz
Style and code unobfuscation.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/rtsock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 58673af..449b4cb 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -326,10 +326,10 @@ route_output(struct mbuf *m, struct socket *so)
if (info.rti_info[RTAX_GENMASK]) {
struct radix_node *t;
t = rn_addmask((caddr_t) info.rti_info[RTAX_GENMASK], 0, 1);
- /* XXX why this odd cast to (caddr_t *) ? Maybe wrong ? */
- if (t && bcmp((caddr_t)info.rti_info[RTAX_GENMASK] + 1,
- (caddr_t)t->rn_key + 1,
- *(u_char *)t->rn_key - 1) == 0)
+ if (t != NULL &&
+ bcmp((caddr_t)info.rti_info[RTAX_GENMASK] + 1,
+ (caddr_t)t->rn_key + 1,
+ ((struct sockaddr *)(t->rn_key))->sa_len - 1) == 0)
info.rti_info[RTAX_GENMASK] =
(struct sockaddr *)(t->rn_key);
else
OpenPOWER on IntegriCloud