diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2010-07-12 14:35:14 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2010-07-12 14:35:14 +0000 |
commit | 5777967a055ce960b51652a49c159d29f3b76415 (patch) | |
tree | af79398bfc74b9db6082612ef5802dfb7ff320dc /usr.sbin/ospfd/kroute.c | |
parent | b997a0110a276cb9cb3a23804191536d5b7c9c6f (diff) |
Merge duplicate log messages into one log_warn().
ok claudio@
Diffstat (limited to 'usr.sbin/ospfd/kroute.c')
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index 28abc58fbe3..a799353e46c 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.85 2010/07/09 15:38:28 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.86 2010/07/12 14:35:13 bluhm Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -1178,8 +1178,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; @@ -1188,20 +1187,11 @@ retry: inet_ntoa(kroute->prefix), kroute->prefixlen); return (0); - } else { - log_warnx("send_rtmsg: action %u, " - "prefix %s/%u: %s", hdr.rtm_type, - inet_ntoa(kroute->prefix), - kroute->prefixlen, strerror(errno)); - return (0); } - break; - default: - log_warnx("send_rtmsg: action %u, prefix %s/%u: %s", - hdr.rtm_type, inet_ntoa(kroute->prefix), - kroute->prefixlen, strerror(errno)); - return (0); } + log_warn("send_rtmsg: action %u, prefix %s/%u", hdr.rtm_type, + inet_ntoa(kroute->prefix), kroute->prefixlen); + return (0); } return (0); |