diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-01-13 23:47:55 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-01-13 23:47:55 +0000 |
commit | 0831ea2ee53634a68952203a73daf221f7cd6be6 (patch) | |
tree | 5531fada3553f69277f8d4dca548a49287f98216 /sys/netipx | |
parent | bcba87c522289abc2ffcc50bfd081018fbfaac66 (diff) | |
download | FreeBSD-src-0831ea2ee53634a68952203a73daf221f7cd6be6.zip FreeBSD-src-0831ea2ee53634a68952203a73daf221f7cd6be6.tar.gz |
Remove dead code associated with 'mcopy' in ipx_forward(): at no point
are the contents of the forwarded mbuf ever copied into mcopy, so there's
no need to have mcopy, conditionally look at mcopy, or conditionally free
it.
Noticed by: Coverity Prevent analysis tool
MFC after: 3 days
Diffstat (limited to 'sys/netipx')
-rw-r--r-- | sys/netipx/ipx_input.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index 7852e2b..9631b74 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -332,7 +332,6 @@ struct mbuf *m; { register struct ipx *ipx = mtod(m, struct ipx *); register int error; - struct mbuf *mcopy = NULL; int agedelta = 1; int flags = IPX_FORWARDING; int ok_there = 0; @@ -409,36 +408,12 @@ struct mbuf *m; ipx_printhost(&ipx->ipx_dna); printf(" hops %d\n", ipx->ipx_tc); } - } else if (mcopy != NULL) { - ipx = mtod(mcopy, struct ipx *); - switch (error) { - - case ENETUNREACH: - case EHOSTDOWN: - case EHOSTUNREACH: - case ENETDOWN: - case EPERM: - ipxstat.ipxs_noroute++; - break; - - case EMSGSIZE: - ipxstat.ipxs_mtutoosmall++; - break; - - case ENOBUFS: - ipxstat.ipxs_odropped++; - break; - } - mcopy = NULL; - m_freem(m); - } + } cleanup: if (ok_there) ipx_undo_route(&ipx_droute); if (ok_back) ipx_undo_route(&ipx_sroute); - if (mcopy != NULL) - m_freem(mcopy); } static int |