diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-09-09 12:59:50 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-09-09 12:59:50 +0000 |
commit | f915b24c79b560135ee57411cd5180ff6a9fcf59 (patch) | |
tree | 56fecd470793d3501061d1df428fc78d23ba9ed5 | |
parent | 033ac39b09cc83cb2b97557bbb288e1a491cdb3b (diff) |
Use msgbuf_init() instead of hand initalizing the msgbuf.
OK tb@
-rw-r--r-- | usr.sbin/bgpd/rde.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/session.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index d72afb28051..4a284720a1c 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.629 2024/08/28 13:21:39 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.630 2024/09/09 12:59:49 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -3199,7 +3199,7 @@ rde_dump_mrt_new(struct mrt *mrt, pid_t pid, int fd) return; } memcpy(&ctx->mrt, mrt, sizeof(struct mrt)); - TAILQ_INIT(&ctx->mrt.wbuf.bufs); + msgbuf_init(&ctx->mrt.wbuf); ctx->mrt.wbuf.fd = fd; ctx->mrt.state = MRT_STATE_RUNNING; rid = rib_find(ctx->mrt.rib); diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 9548fe191e5..c176edb6797 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.481 2024/08/20 11:59:39 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.482 2024/09/09 12:59:49 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -3159,13 +3159,13 @@ session_dispatch_imsg(struct imsgbuf *imsgbuf, int idx, u_int *listener_cnt) if (mrt == NULL) fatal("session_dispatch_imsg"); memcpy(mrt, &xmrt, sizeof(struct mrt)); - TAILQ_INIT(&mrt->wbuf.bufs); + msgbuf_init(&mrt->wbuf); LIST_INSERT_HEAD(&mrthead, mrt, entry); } else { /* old dump reopened */ close(mrt->wbuf.fd); - mrt->wbuf.fd = xmrt.wbuf.fd; } + mrt->wbuf.fd = xmrt.wbuf.fd; break; case IMSG_MRT_CLOSE: if (idx != PFD_PIPE_MAIN) |