Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2014 12:52:36 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265091 - head/sys/net
Message-ID:  <201404291252.s3TCqb8O033375@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404291252.s3TCqb8O033375>