diff options
author | luigi <luigi@FreeBSD.org> | 2004-04-18 11:47:04 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2004-04-18 11:47:04 +0000 |
commit | f2ac9cb85499117348c618f70c676558700caf4f (patch) | |
tree | 1caf32d3e06f46341317ea57933844142ade1f21 /sys/net | |
parent | bc53551bd98fcfe22f77c44c69d007b06fb06906 (diff) | |
download | FreeBSD-src-f2ac9cb85499117348c618f70c676558700caf4f.zip FreeBSD-src-f2ac9cb85499117348c618f70c676558700caf4f.tar.gz |
+ replace Bcmp/Bzero with 'the real thing' as in the rest of the file.
+ remember to check and fix or explain a strange cast in route_output()
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/rtsock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 7ee4413..e9fa47f 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -326,7 +326,8 @@ 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); - if (t && Bcmp((caddr_t *) info.rti_info[RTAX_GENMASK] + 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) info.rti_info[RTAX_GENMASK] = @@ -418,7 +419,7 @@ route_output(struct mbuf *m, struct socket *so) RT_UNLOCK(rt); senderr(ENOBUFS); } - Bcopy(rtm, new_rtm, rtm->rtm_msglen); + bcopy(rtm, new_rtm, rtm->rtm_msglen); Free(rtm); rtm = new_rtm; } (void)rt_msg2(rtm->rtm_type, &info, (caddr_t)rtm, NULL); @@ -1078,7 +1079,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) af = name[0]; if (af > AF_MAX) return (EINVAL); - Bzero(&w, sizeof(w)); + bzero(&w, sizeof(w)); w.w_op = name[1]; w.w_arg = name[2]; w.w_req = req; |