From 14984031b76c2bcb8a6eee5ea32c57a37aa8facc Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 7 Mar 2017 19:00:50 +0000 Subject: [PATCH] m_mbuftouio() doesn't modify the mbuf. --- sys/kern/uipc_mbuf.c | 2 +- sys/sys/mbuf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index b29061247d00..7cff0a7d9251 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1561,7 +1561,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int align, int flags) * Copy an mbuf chain into a uio limited by len if set. */ int -m_mbuftouio(struct uio *uio, struct mbuf *m, int len) +m_mbuftouio(struct uio *uio, const struct mbuf *m, int len) { int error, length, total; int progress = 0; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 1651767687d8..ecc5c2a9aab2 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -614,7 +614,7 @@ struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); struct mbuf *m_getptr(struct mbuf *, int, int *); u_int m_length(struct mbuf *, struct mbuf **); -int m_mbuftouio(struct uio *, struct mbuf *, int); +int m_mbuftouio(struct uio *, const struct mbuf *, int); void m_move_pkthdr(struct mbuf *, struct mbuf *); int m_pkthdr_init(struct mbuf *, int); struct mbuf *m_prepend(struct mbuf *, int, int);