summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-03-12 20:48:10 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-03-12 20:48:10 +0000
commit39d8d6e6b69ee3f8035950b1893d99653e24916f (patch)
treee9b0a831748c0bec333b559d73a3731f206c5176
parent2e426dc8db759274408439b75f3a6c043ddad889 (diff)
tweak err reporting
-rw-r--r--usr.sbin/bgpd/imsg.c6
-rw-r--r--usr.sbin/bgpd/rde.c14
2 files changed, 7 insertions, 13 deletions
diff --git a/usr.sbin/bgpd/imsg.c b/usr.sbin/bgpd/imsg.c
index aca2b2e6d26..e461970ee07 100644
--- a/usr.sbin/bgpd/imsg.c
+++ b/usr.sbin/bgpd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.23 2004/02/16 14:26:29 claudio Exp $ */
+/* $OpenBSD: imsg.c,v 1.24 2004/03/12 20:48:09 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -124,7 +124,7 @@ imsg_compose_core(struct imsgbuf *ibuf, int type, u_int32_t peerid, void *data,
hdr.pid = pid;
wbuf = buf_open(hdr.len);
if (wbuf == NULL) {
- log_warnx("imsg_compose: buf_open error");
+ log_warn("imsg_compose: buf_open");
return (-1);
}
if (buf_add(wbuf, &hdr, sizeof(hdr)) == -1) {
@@ -172,7 +172,7 @@ imsg_create_core(struct imsgbuf *ibuf, int type, u_int32_t peerid,
hdr.pid = pid;
wbuf = buf_open(hdr.len);
if (wbuf == NULL) {
- log_warnx("imsg_create: buf_open error");
+ log_warn("imsg_create: buf_open");
return (NULL);
}
if (buf_add(wbuf, &hdr, sizeof(hdr)) == -1) {
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index d024707870f..75cf1572da2 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.98 2004/03/12 19:33:30 henning Exp $ */
+/* $OpenBSD: rde.c,v 1.99 2004/03/12 20:48:09 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -664,20 +664,14 @@ rde_dump_rib_as(struct prefix *p, pid_t pid)
rib.aspath_len = aspath_length(p->aspath->flags.aspath);
if ((wbuf = imsg_create_pid(&ibuf_se, IMSG_CTL_SHOW_RIB, pid,
- sizeof(rib) + rib.aspath_len)) == NULL) {
- log_warnx("rde_dump_upcall: imsg_create error");
+ sizeof(rib) + rib.aspath_len)) == NULL)
return;
- }
if (imsg_add(wbuf, &rib, sizeof(rib)) == -1 ||
imsg_add(wbuf, aspath_dump(p->aspath->flags.aspath),
- rib.aspath_len) == -1) {
- log_warnx("rde_dump_upcall: imsg_add error");
+ rib.aspath_len) == -1)
return;
- }
- if (imsg_close(&ibuf_se, wbuf) == -1) {
- log_warnx("rde_dump_upcall: imsg_close error");
+ if (imsg_close(&ibuf_se, wbuf) == -1)
return;
- }
}
void