From owner-svn-src-head@FreeBSD.ORG Tue Apr 29 12:52:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3927951C; Tue, 29 Apr 2014 12:52:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 265271FCF; Tue, 29 Apr 2014 12:52:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3TCqbf1033376; Tue, 29 Apr 2014 12:52:37 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3TCqb8O033375; Tue, 29 Apr 2014 12:52:37 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201404291252.s3TCqb8O033375@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 29 Apr 2014 12:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265091 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 12:52:37 -0000 Author: melifaro Date: Tue Apr 29 12:52:36 2014 New Revision: 265091 URL: http://svnweb.freebsd.org/changeset/base/265091 Log: Do not use senderr() in rtrequest1_fib_change(). Suggested by: glebius MFC after: 4 weeks Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Apr 29 11:31:22 2014 (r265090) +++ head/sys/net/route.c Tue Apr 29 12:52:36 2014 (r265091) @@ -1431,7 +1431,6 @@ bad: #undef ifpaddr #undef flags -#define senderr(e) { error = e; goto bad; } static int rtrequest1_fib_change(struct radix_node_head *rnh, struct rt_addrinfo *info, struct rtentry **ret_nrt, u_int fibnum) @@ -1476,7 +1475,7 @@ rtrequest1_fib_change(struct radix_node_ free_ifa = 1; if (error != 0) - senderr(error); + goto bad; } /* Check if outgoing interface has changed */ @@ -1489,7 +1488,7 @@ rtrequest1_fib_change(struct radix_node_ if (info->rti_info[RTAX_GATEWAY] != NULL) { error = rt_setgate(rt, rt_key(rt), info->rti_info[RTAX_GATEWAY]); if (error != 0) - senderr(error); + goto bad; rt->rt_flags &= ~RTF_GATEWAY; rt->rt_flags |= (RTF_GATEWAY & info->rti_flags); @@ -1517,8 +1516,6 @@ bad: ifa_free(info->rti_ifa); return (error); } -#undef senderr - int rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate)