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/ldpd | |
parent | b997a0110a276cb9cb3a23804191536d5b7c9c6f (diff) |
Merge duplicate log messages into one log_warn().
ok claudio@
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r-- | usr.sbin/ldpd/kroute.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c index 5a41668f44f..38e27a8c0ce 100644 --- a/usr.sbin/ldpd/kroute.c +++ b/usr.sbin/ldpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.19 2010/07/08 09:41:05 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.20 2010/07/12 14:35:13 bluhm Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -1055,8 +1055,7 @@ send_rtmsg(int fd, int action, struct kroute *kroute, u_int32_t family) retry: if (writev(fd, iov, iovcnt) == -1) { - switch (errno) { - case ESRCH: + if (errno == ESRCH) { if (hdr.rtm_type == RTM_CHANGE && family == AF_MPLS) { hdr.rtm_type = RTM_ADD; goto retry; @@ -1065,21 +1064,12 @@ 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, " - "AF %d prefix %s/%u: %s", hdr.rtm_type, - family, inet_ntoa(kroute->prefix), - kroute->prefixlen, strerror(errno)); - return (0); } + log_warn("send_rtmsg: action %u, AF %d, prefix %s/%u", + hdr.rtm_type, family, inet_ntoa(kroute->prefix), + kroute->prefixlen); + return (0); } if (hr_label == MPLS_LABEL_IMPLNULL) { |