diff options
author | glebius <glebius@FreeBSD.org> | 2013-04-26 12:50:32 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2013-04-26 12:50:32 +0000 |
commit | b4bc270e8f6757fa385861750ab22ba0ca4978ed (patch) | |
tree | 073e97431b8851637e702226bc02446cb01b0f4b /sys/net/if_gif.c | |
parent | 7eab2144525c38723764e418181b36c7e9cbafad (diff) | |
download | FreeBSD-src-b4bc270e8f6757fa385861750ab22ba0ca4978ed.zip FreeBSD-src-b4bc270e8f6757fa385861750ab22ba0ca4978ed.tar.gz |
Add const qualifier to the dst parameter of the ifnet if_output method.
Diffstat (limited to 'sys/net/if_gif.c')
-rw-r--r-- | sys/net/if_gif.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 9fef6c7..2a6f890 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -422,11 +422,8 @@ gif_start(struct ifnet *ifp) } int -gif_output(ifp, m, dst, ro) - struct ifnet *ifp; - struct mbuf *m; - struct sockaddr *dst; - struct route *ro; +gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, + struct route *ro) { struct gif_softc *sc = ifp->if_softc; struct m_tag *mtag; @@ -482,11 +479,10 @@ gif_output(ifp, m, dst, ro) m->m_flags &= ~(M_BCAST|M_MCAST); /* BPF writes need to be handled specially. */ - if (dst->sa_family == AF_UNSPEC) { + if (dst->sa_family == AF_UNSPEC) bcopy(dst->sa_data, &af, sizeof(af)); - dst->sa_family = af; - } - af = dst->sa_family; + else + af = dst->sa_family; /* * Now save the af in the inbound pkt csum * data, this is a cheat since we are using |