summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-03-03 16:31:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-03-03 16:31:13 +0000
commit89508f51cfa8a892c4883d372ba8b2c7a869d37f (patch)
treee11dcc41988698e35ca1ad5ba7c0728158716bf4
parent431b11ae4cff4b78d9f5a44cdd04cab8c6f6e7cb (diff)
Found some historical code. Don't cast the pointer for bzero to a different type,
and definately don't do this to the length: (unsigned)(cplim2 - cp2) ok claudio
-rw-r--r--sys/net/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 61ac149a949..512d554dc41 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.382 2019/02/15 21:16:01 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.383 2019/03/03 16:31:12 deraadt Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1026,7 +1026,7 @@ rt_maskedcopy(struct sockaddr *src, struct sockaddr *dst,
while (cp2 < cplim)
*cp2++ = *cp1++ & *cp3++;
if (cp2 < cplim2)
- bzero((caddr_t)cp2, (unsigned)(cplim2 - cp2));
+ bzero(cp2, cplim2 - cp2);
}
int