summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:17:59 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:17:59 +0000
commit4efad393769386dddf5775e5943647ffd6ef04e0 (patch)
treeaff4368f8771b71684bbc5c079be47a6bea32b51 /usr.sbin/ntpd
parentcaba869c8447fc7ef9f32581e1d02262e51ec18a (diff)
Use imsgbuf_clear() where appropriate instead of msgbuf_clear().
OK tb@
Diffstat (limited to 'usr.sbin/ntpd')
-rw-r--r--usr.sbin/ntpd/constraint.c4
-rw-r--r--usr.sbin/ntpd/control.c4
-rw-r--r--usr.sbin/ntpd/ntp.c6
-rw-r--r--usr.sbin/ntpd/ntp_dns.c4
-rw-r--r--usr.sbin/ntpd/ntpd.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/ntpd/constraint.c b/usr.sbin/ntpd/constraint.c
index 4241b70cc83..b994c02cf6b 100644
--- a/usr.sbin/ntpd/constraint.c
+++ b/usr.sbin/ntpd/constraint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: constraint.c,v 1.57 2024/11/21 13:17:02 claudio Exp $ */
+/* $OpenBSD: constraint.c,v 1.58 2024/11/21 13:17:57 claudio Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -581,7 +581,7 @@ constraint_remove(struct constraint *cstr)
{
TAILQ_REMOVE(&conf->constraints, cstr, entry);
- msgbuf_clear(&cstr->ibuf.w);
+ imsgbuf_clear(&cstr->ibuf);
if (cstr->fd != -1)
close(cstr->fd);
free(cstr->addr_head.name);
diff --git a/usr.sbin/ntpd/control.c b/usr.sbin/ntpd/control.c
index 3ecb251c5a0..e6d27260f48 100644
--- a/usr.sbin/ntpd/control.c
+++ b/usr.sbin/ntpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.24 2024/11/21 13:17:02 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.25 2024/11/21 13:17:57 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -179,7 +179,7 @@ control_close(int fd)
return (0);
}
- msgbuf_clear(&c->ibuf.w);
+ imsgbuf_clear(&c->ibuf);
TAILQ_REMOVE(&ctl_conns, c, entry);
close(c->ibuf.fd);
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index 078f5876311..e25f61b2a2e 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.177 2024/11/21 13:17:02 claudio Exp $ */
+/* $OpenBSD: ntp.c,v 1.178 2024/11/21 13:17:57 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -461,10 +461,10 @@ ntp_main(struct ntpd_conf *nconf, struct passwd *pw, int argc, char **argv)
}
imsgbuf_write(ibuf_main);
- msgbuf_clear(&ibuf_main->w);
+ imsgbuf_clear(ibuf_main);
free(ibuf_main);
imsgbuf_write(ibuf_dns);
- msgbuf_clear(&ibuf_dns->w);
+ imsgbuf_clear(ibuf_dns);
free(ibuf_dns);
log_info("ntp engine exiting");
diff --git a/usr.sbin/ntpd/ntp_dns.c b/usr.sbin/ntpd/ntp_dns.c
index 0e56a0fa5b1..a3dbdf9606e 100644
--- a/usr.sbin/ntpd/ntp_dns.c
+++ b/usr.sbin/ntpd/ntp_dns.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp_dns.c,v 1.32 2024/11/21 13:17:02 claudio Exp $ */
+/* $OpenBSD: ntp_dns.c,v 1.33 2024/11/21 13:17:57 claudio Exp $ */
/*
* Copyright (c) 2003-2008 Henning Brauer <henning@openbsd.org>
@@ -129,7 +129,7 @@ ntp_dns(struct ntpd_conf *nconf, struct passwd *pw)
}
}
- msgbuf_clear(&ibuf_dns->w);
+ imsgbuf_clear(ibuf_dns);
free(ibuf_dns);
exit(0);
}
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c
index 103fff3331b..be72394ff18 100644
--- a/usr.sbin/ntpd/ntpd.c
+++ b/usr.sbin/ntpd/ntpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.c,v 1.137 2024/11/21 13:17:02 claudio Exp $ */
+/* $OpenBSD: ntpd.c,v 1.138 2024/11/21 13:17:57 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -365,7 +365,7 @@ main(int argc, char *argv[])
fatal("wait");
} while (pid != -1 || (pid == -1 && errno == EINTR));
- msgbuf_clear(&ibuf->w);
+ imsgbuf_clear(ibuf);
free(ibuf);
log_info("Terminating");
return (0);