From: claudio Date: Tue, 7 Nov 2023 11:18:35 +0000 (+0000) Subject: Rename struct imsgbuf *ibuf to *imsgbuf in all places. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d1ee0d19b86fbaea77bc10a74a689a561921ccf9;p=openbsd Rename struct imsgbuf *ibuf to *imsgbuf in all places. ibuf should be reserved for struct ibuf * values. OK tb@ --- diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 1131e152bb5..5ad395a6d34 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.259 2023/08/16 08:26:35 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.260 2023/11/07 11:18:35 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -829,7 +829,7 @@ send_config(struct bgpd_config *conf) } int -dispatch_imsg(struct imsgbuf *ibuf, int idx, struct bgpd_config *conf) +dispatch_imsg(struct imsgbuf *imsgbuf, int idx, struct bgpd_config *conf) { struct imsg imsg; struct peer *p; @@ -839,8 +839,8 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx, struct bgpd_config *conf) int rv, verbose; rv = 0; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) return (-1); if (n == 0) diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index d163be17512..79c548e48e7 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.113 2023/09/28 07:01:26 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.114 2023/11/07 11:18:35 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -606,20 +606,20 @@ control_result(struct ctl_conn *c, u_int code) /* This should go into libutil, from smtpd/mproc.c */ ssize_t -imsg_read_nofd(struct imsgbuf *ibuf) +imsg_read_nofd(struct imsgbuf *imsgbuf) { ssize_t n; char *buf; size_t len; - buf = ibuf->r.buf + ibuf->r.wpos; - len = sizeof(ibuf->r.buf) - ibuf->r.wpos; + buf = imsgbuf->r.buf + imsgbuf->r.wpos; + len = sizeof(imsgbuf->r.buf) - imsgbuf->r.wpos; - while ((n = recv(ibuf->fd, buf, len, 0)) == -1) { + while ((n = recv(imsgbuf->fd, buf, len, 0)) == -1) { if (errno != EINTR) return (n); } - ibuf->r.wpos += n; + imsgbuf->r.wpos += n; return (n); } diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 659622bb065..ef631708a67 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.611 2023/10/16 10:25:45 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.612 2023/11/07 11:18:35 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -360,7 +360,7 @@ struct filter_set_head session_set = TAILQ_HEAD_INITIALIZER(session_set); struct filter_set_head parent_set = TAILQ_HEAD_INITIALIZER(parent_set); void -rde_dispatch_imsg_session(struct imsgbuf *ibuf) +rde_dispatch_imsg_session(struct imsgbuf *imsgbuf) { static struct flowspec *curflow; struct imsg imsg; @@ -381,8 +381,8 @@ rde_dispatch_imsg_session(struct imsgbuf *ibuf) uint16_t len; uint8_t aid; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) fatal("rde_dispatch_imsg_session: imsg_get error"); if (n == 0) break; @@ -820,7 +820,7 @@ badnetdel: } void -rde_dispatch_imsg_parent(struct imsgbuf *ibuf) +rde_dispatch_imsg_parent(struct imsgbuf *imsgbuf) { static struct rde_prefixset *last_prefixset; static struct as_set *last_as_set; @@ -844,8 +844,8 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf) int n, fd, rv; uint16_t rid; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) fatal("rde_dispatch_imsg_parent: imsg_get error"); if (n == 0) break; @@ -1250,7 +1250,7 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf) } void -rde_dispatch_imsg_rtr(struct imsgbuf *ibuf) +rde_dispatch_imsg_rtr(struct imsgbuf *imsgbuf) { static struct aspa_set *aspa; struct imsg imsg; @@ -1258,8 +1258,8 @@ rde_dispatch_imsg_rtr(struct imsgbuf *ibuf) struct aspa_prep ap; int n; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) fatal("rde_dispatch_imsg_parent: imsg_get error"); if (n == 0) break; diff --git a/usr.sbin/bgpd/rtr.c b/usr.sbin/bgpd/rtr.c index 407bac6f4f7..0619e6a1f32 100644 --- a/usr.sbin/bgpd/rtr.c +++ b/usr.sbin/bgpd/rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtr.c,v 1.16 2023/08/16 08:26:35 claudio Exp $ */ +/* $OpenBSD: rtr.c,v 1.17 2023/11/07 11:18:35 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker @@ -303,7 +303,7 @@ rtr_main(int debug, int verbose) } static void -rtr_dispatch_imsg_parent(struct imsgbuf *ibuf) +rtr_dispatch_imsg_parent(struct imsgbuf *imsgbuf) { static struct aspa_set *aspa; struct imsg imsg; @@ -311,8 +311,8 @@ rtr_dispatch_imsg_parent(struct imsgbuf *ibuf) struct rtr_session *rs; int n, fd; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) fatal("%s: imsg_get error", __func__); if (n == 0) break; @@ -450,13 +450,13 @@ rtr_dispatch_imsg_parent(struct imsgbuf *ibuf) } static void -rtr_dispatch_imsg_rde(struct imsgbuf *ibuf) +rtr_dispatch_imsg_rde(struct imsgbuf *imsgbuf) { struct imsg imsg; int n; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) fatal("%s: imsg_get error", __func__); if (n == 0) break; diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 63d83a5778f..7480937fc62 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.454 2023/11/04 11:17:51 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.455 2023/11/07 11:18:35 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -2950,7 +2950,7 @@ capa_neg_calc(struct peer *p, uint8_t *suberr) } void -session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt) +session_dispatch_imsg(struct imsgbuf *imsgbuf, int idx, u_int *listener_cnt) { struct imsg imsg; struct mrt xmrt; @@ -2965,8 +2965,8 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt) uint16_t t; uint8_t aid, errcode, subcode; - while (ibuf) { - if ((n = imsg_get(ibuf, &imsg)) == -1) + while (imsgbuf) { + if ((n = imsg_get(imsgbuf, &imsg)) == -1) fatal("session_dispatch_imsg: imsg_get error"); if (n == 0)