summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d/kroute.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2010-07-12 14:35:14 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2010-07-12 14:35:14 +0000
commit5777967a055ce960b51652a49c159d29f3b76415 (patch)
treeaf79398bfc74b9db6082612ef5802dfb7ff320dc /usr.sbin/ospf6d/kroute.c
parentb997a0110a276cb9cb3a23804191536d5b7c9c6f (diff)
Merge duplicate log messages into one log_warn().
ok claudio@
Diffstat (limited to 'usr.sbin/ospf6d/kroute.c')
-rw-r--r--usr.sbin/ospf6d/kroute.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/usr.sbin/ospf6d/kroute.c b/usr.sbin/ospf6d/kroute.c
index 5ef15e843f8..5debe86d37e 100644
--- a/usr.sbin/ospf6d/kroute.c
+++ b/usr.sbin/ospf6d/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.25 2010/07/06 13:24:35 bluhm Exp $ */
+/* $OpenBSD: kroute.c,v 1.26 2010/07/12 14:35:13 bluhm Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -1110,8 +1110,7 @@ send_rtmsg(int fd, int action, struct kroute *kroute)
retry:
if (writev(fd, iov, iovcnt) == -1) {
- switch (errno) {
- case ESRCH:
+ if (errno == ESRCH) {
if (hdr.rtm_type == RTM_CHANGE) {
hdr.rtm_type = RTM_ADD;
goto retry;
@@ -1119,19 +1118,11 @@ retry:
log_info("route %s/%u vanished before delete",
log_sockaddr(&prefix), kroute->prefixlen);
return (0);
- } else {
- log_warn("send_rtmsg: action %u, "
- "prefix %s/%u", hdr.rtm_type,
- log_sockaddr(&prefix), kroute->prefixlen);
- return (0);
}
- break;
- default:
- log_warn("send_rtmsg: action %u, prefix %s/%u",
- hdr.rtm_type, log_sockaddr(&prefix),
- kroute->prefixlen);
- return (0);
}
+ log_warn("send_rtmsg: action %u, prefix %s/%u", hdr.rtm_type,
+ log_sockaddr(&prefix), kroute->prefixlen);
+ return (0);
}
return (0);