summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ntpd/client.c4
-rw-r--r--usr.sbin/ntpd/config.c8
-rw-r--r--usr.sbin/ntpd/control.c4
-rw-r--r--usr.sbin/ntpd/ntp.c8
-rw-r--r--usr.sbin/ntpd/ntpd.c6
-rw-r--r--usr.sbin/ntpd/parse.y4
-rw-r--r--usr.sbin/ntpd/server.c4
7 files changed, 19 insertions, 19 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index 09681db23dc..93e69eadb26 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.101 2015/03/28 03:49:01 bcook Exp $ */
+/* $OpenBSD: client.c,v 1.102 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -215,7 +215,7 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
double T1, T2, T3, T4;
time_t interval;
- bzero(&somsg, sizeof(somsg));
+ memset(&somsg, 0, sizeof(somsg));
iov[0].iov_base = buf;
iov[0].iov_len = sizeof(buf);
somsg.msg_iov = iov;
diff --git a/usr.sbin/ntpd/config.c b/usr.sbin/ntpd/config.c
index 35d7b31f742..dc56b12b904 100644
--- a/usr.sbin/ntpd/config.c
+++ b/usr.sbin/ntpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.26 2015/02/10 06:40:08 reyk Exp $ */
+/* $OpenBSD: config.c,v 1.27 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -65,7 +65,7 @@ host_v4(const char *s)
struct sockaddr_in *sa_in;
struct ntp_addr *h;
- bzero(&ina, sizeof(struct in_addr));
+ memset(&ina, 0, sizeof(struct in_addr));
if (inet_pton(AF_INET, s, &ina) != 1)
return (NULL);
@@ -86,7 +86,7 @@ host_v6(const char *s)
struct sockaddr_in6 *sa_in6;
struct ntp_addr *h = NULL;
- bzero(&hints, sizeof(hints));
+ memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_DGRAM; /*dummy*/
hints.ai_flags = AI_NUMERICHOST;
@@ -128,7 +128,7 @@ host_dns(const char *s, struct ntp_addr **hn)
struct sockaddr_in6 *sa_in6;
struct ntp_addr *h, *hh = NULL;
- bzero(&hints, sizeof(hints));
+ memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
/* ntpd MUST NOT use AI_ADDRCONFIG here */
diff --git a/usr.sbin/ntpd/control.c b/usr.sbin/ntpd/control.c
index 867f91122fa..2dd76d16fbf 100644
--- a/usr.sbin/ntpd/control.c
+++ b/usr.sbin/ntpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.5 2015/02/10 06:40:08 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.6 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -45,7 +45,7 @@ control_init(char *path)
return (-1);
}
- bzero(&sa, sizeof(sa));
+ memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
if (strlcpy(sa.sun_path, path, sizeof(sa.sun_path)) >=
sizeof(sa.sun_path))
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index 892509ca1d2..bb9e2a44664 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.132 2015/05/25 14:58:34 deraadt Exp $ */
+/* $OpenBSD: ntp.c,v 1.133 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -188,7 +188,7 @@ ntp_main(int pipe_prnt[2], int fd_ctl, struct ntpd_conf *nconf,
TAILQ_FOREACH(p, &conf->ntp_peers, entry)
client_peer_init(p);
- bzero(&conf->status, sizeof(conf->status));
+ memset(&conf->status, 0, sizeof(conf->status));
conf->freq.num = 0;
conf->freq.samples = 0;
@@ -246,8 +246,8 @@ ntp_main(int pipe_prnt[2], int fd_ctl, struct ntpd_conf *nconf,
pfd_elms = new_cnt;
}
- bzero(pfd, sizeof(*pfd) * pfd_elms);
- bzero(idx2peer, sizeof(*idx2peer) * idx2peer_elms);
+ memset(pfd, 0, sizeof(*pfd) * pfd_elms);
+ memset(idx2peer, 0, sizeof(*idx2peer) * idx2peer_elms);
nextaction = getmonotime() + 3600;
pfd[PFD_PIPE_MAIN].fd = ibuf_main->fd;
pfd[PFD_PIPE_MAIN].events = POLLIN;
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c
index b0ef5869e56..0b591e851f5 100644
--- a/usr.sbin/ntpd/ntpd.c
+++ b/usr.sbin/ntpd/ntpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.c,v 1.93 2015/03/11 19:38:48 jmc Exp $ */
+/* $OpenBSD: ntpd.c,v 1.94 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -119,7 +119,7 @@ main(int argc, char *argv[])
conffile = CONFFILE;
- bzero(&lconf, sizeof(lconf));
+ memset(&lconf, 0, sizeof(lconf));
log_init(1); /* log to stderr until daemonized */
@@ -557,7 +557,7 @@ ctl_main(int argc, char *argv[])
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
err(1, "ntpctl: socket");
- bzero(&sa, sizeof(sa));
+ memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
if (strlcpy(sa.sun_path, sockname, sizeof(sa.sun_path)) >=
sizeof(sa.sun_path))
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y
index 1295c7c9611..52852f77d12 100644
--- a/usr.sbin/ntpd/parse.y
+++ b/usr.sbin/ntpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.62 2015/05/17 18:31:32 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.63 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -426,7 +426,7 @@ rtable : RTABLE NUMBER {
void
opts_default(void)
{
- bzero(&opts, sizeof opts);
+ memset(&opts, 0, sizeof opts);
opts.weight = 1;
opts.rtable = -1;
opts.stratum = 1;
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c
index 85f0837848d..06ee621fae7 100644
--- a/usr.sbin/ntpd/server.c
+++ b/usr.sbin/ntpd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.42 2015/05/19 16:07:38 reyk Exp $ */
+/* $OpenBSD: server.c,v 1.43 2015/07/18 00:53:44 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -175,7 +175,7 @@ server_dispatch(int fd, struct ntpd_conf *lconf)
if (ntp_getmsg((struct sockaddr *)&fsa, buf, size, &query) == -1)
return (0);
- bzero(&reply, sizeof(reply));
+ memset(&reply, 0, sizeof(reply));
if (lconf->status.synced)
reply.status = lconf->status.leap;
else