the rt parameter to ifa_rtrequest callbacks should always be non-null;

eliminate grauitous ptr checks that follow ptr deref's

Noticed by:	Coverity Prevent analysis tool
This commit is contained in:
Sam Leffler 2005-02-24 01:34:01 +00:00
parent 087f49016f
commit 89bc9a3171
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142352
4 changed files with 4 additions and 10 deletions

View File

@ -202,9 +202,7 @@ static void
discrtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
{
RT_LOCK_ASSERT(rt);
if (rt)
rt->rt_rmx.rmx_mtu = DSMTU;
rt->rt_rmx.rmx_mtu = DSMTU;
}
/*

View File

@ -275,8 +275,7 @@ faithrtrequest(cmd, rt, info)
struct rt_addrinfo *info;
{
RT_LOCK_ASSERT(rt);
if (rt)
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
}
/*

View File

@ -323,8 +323,7 @@ lortrequest(cmd, rt, info)
struct rt_addrinfo *info;
{
RT_LOCK_ASSERT(rt);
if (rt)
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
}
/*

View File

@ -766,9 +766,7 @@ stf_rtrequest(cmd, rt, info)
struct rt_addrinfo *info;
{
RT_LOCK_ASSERT(rt);
if (rt)
rt->rt_rmx.rmx_mtu = IPV6_MMTU;
rt->rt_rmx.rmx_mtu = IPV6_MMTU;
}
static int