Please Coverity by removing unneccessary check (rt_key() is always set).

Coverity CID:	1347797
This commit is contained in:
Alexander V. Chernikov 2016-01-09 05:39:06 +00:00
parent 1b1632a243
commit 16703ea811

View File

@ -858,7 +858,7 @@ rt_exportinfo(struct rtentry *rt, struct rt_addrinfo *info, int flags)
src = rt_key(rt);
dst = info->rti_info[RTAX_DST];
sa_len = src->sa_len;
if (src != NULL && dst != NULL) {
if (dst != NULL) {
if (src->sa_len > dst->sa_len)
return (ENOMEM);
memcpy(dst, src, src->sa_len);