summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-07 19:14:50 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-07 19:14:50 +0000
commit7880467d0eed12735f39e9185624487c4beef6d7 (patch)
tree201cdc3ed74badbbc4061d1d761029c67ee12fd2
parentc1f9928dedf67c5fb0fae2d8b1c0366cbadb3d72 (diff)
Replace bzero with memset, and change a strings.h include to string.h to
get the declaration. From Serguey Parkhomovsky. No objects from deraadt@.
-rw-r--r--usr.sbin/dvmrpd/control.c4
-rw-r--r--usr.sbin/dvmrpd/igmp.c4
-rw-r--r--usr.sbin/dvmrpd/kroute.c4
-rw-r--r--usr.sbin/dvmrpd/packet.c4
-rw-r--r--usr.sbin/dvmrpd/prune.c8
-rw-r--r--usr.sbin/dvmrpd/rde_mfc.c4
6 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/dvmrpd/control.c b/usr.sbin/dvmrpd/control.c
index 4ee92fbb4af..c3ef8bdd749 100644
--- a/usr.sbin/dvmrpd/control.c
+++ b/usr.sbin/dvmrpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.21 2015/12/05 13:11:00 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.22 2015/12/07 19:14:49 mmcc Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -52,7 +52,7 @@ control_init(void)
return (-1);
}
- bzero(&sun, sizeof(sun));
+ memset(&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;
strlcpy(sun.sun_path, DVMRPD_SOCKET, sizeof(sun.sun_path));
diff --git a/usr.sbin/dvmrpd/igmp.c b/usr.sbin/dvmrpd/igmp.c
index 8b0a4d8fbda..90196710250 100644
--- a/usr.sbin/dvmrpd/igmp.c
+++ b/usr.sbin/dvmrpd/igmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: igmp.c,v 1.3 2014/11/18 20:54:28 krw Exp $ */
+/* $OpenBSD: igmp.c,v 1.4 2015/12/07 19:14:49 mmcc Exp $ */
/*
* Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -51,7 +51,7 @@ send_igmp_query(struct iface *iface, struct group *group)
fatal("send_igmp_query");
/* IGMP header */
- bzero(&igmp_hdr, sizeof(igmp_hdr));
+ memset(&igmp_hdr, 0, sizeof(igmp_hdr));
igmp_hdr.type = PKT_TYPE_MEMBER_QUERY;
if (group == NULL) {
diff --git a/usr.sbin/dvmrpd/kroute.c b/usr.sbin/dvmrpd/kroute.c
index 763d0f44693..19726ee175b 100644
--- a/usr.sbin/dvmrpd/kroute.c
+++ b/usr.sbin/dvmrpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.12 2015/09/27 17:29:46 stsp Exp $ */
+/* $OpenBSD: kroute.c,v 1.13 2015/12/07 19:14:49 mmcc Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -136,7 +136,7 @@ kif_find(int ifindex)
{
struct kif_node s;
- bzero(&s, sizeof(s));
+ memset(&s, 0, sizeof(s));
s.k.ifindex = ifindex;
return (RB_FIND(kif_tree, &kit, &s));
diff --git a/usr.sbin/dvmrpd/packet.c b/usr.sbin/dvmrpd/packet.c
index fa370877200..b88716b70a6 100644
--- a/usr.sbin/dvmrpd/packet.c
+++ b/usr.sbin/dvmrpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.4 2015/12/07 18:59:31 mmcc Exp $ */
+/* $OpenBSD: packet.c,v 1.5 2015/12/07 19:14:49 mmcc Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -48,7 +48,7 @@ gen_dvmrp_hdr(struct ibuf *buf, struct iface *iface, u_int8_t code)
{
struct dvmrp_hdr dvmrp_hdr;
- bzero(&dvmrp_hdr, sizeof(dvmrp_hdr));
+ memset(&dvmrp_hdr, 0, sizeof(dvmrp_hdr));
dvmrp_hdr.type = PKT_TYPE_DVMRP;
dvmrp_hdr.code = code;
dvmrp_hdr.chksum = 0; /* updated later */
diff --git a/usr.sbin/dvmrpd/prune.c b/usr.sbin/dvmrpd/prune.c
index c99f01d76db..ef9355c3ea9 100644
--- a/usr.sbin/dvmrpd/prune.c
+++ b/usr.sbin/dvmrpd/prune.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prune.c,v 1.5 2015/05/05 01:26:37 jsg Exp $ */
+/* $OpenBSD: prune.c,v 1.6 2015/12/07 19:14:49 mmcc Exp $ */
/*
* Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -23,7 +23,7 @@
#include <arpa/inet.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include "igmp.h"
#include "dvmrpd.h"
@@ -47,7 +47,7 @@ send_prune(struct nbr *nbr, struct prune *p)
if (nbr->iface->passive)
return (0);
- bzero(&prune, sizeof(prune));
+ memset(&prune, 0, sizeof(prune));
dst.sin_family = AF_INET;
dst.sin_len = sizeof(struct sockaddr_in);
@@ -97,7 +97,7 @@ recv_prune(struct nbr *nbr, char *buf, u_int16_t len)
return;
}
- bzero(&p, sizeof(p));
+ memset(&p, 0, sizeof(p));
prune = (struct prune_hdr *)buf;
diff --git a/usr.sbin/dvmrpd/rde_mfc.c b/usr.sbin/dvmrpd/rde_mfc.c
index 8391aba05d8..653dac52853 100644
--- a/usr.sbin/dvmrpd/rde_mfc.c
+++ b/usr.sbin/dvmrpd/rde_mfc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_mfc.c,v 1.9 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: rde_mfc.c,v 1.10 2015/12/07 19:14:49 mmcc Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -251,7 +251,7 @@ mfc_send_prune(struct rt_node *rn, struct mfc_node *mn)
{
struct prune p;
- bzero(&p, sizeof(p));
+ memset(&p, 0, sizeof(p));
p.origin.s_addr = (mn->origin.s_addr &
htonl(prefixlen2mask(rn->prefixlen)));