From 50ca5d0c7b80dd7509172ab4ed237f25739c3c5b Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 18 Sep 2002 19:42:06 +0000 Subject: Make m_length() and m_fixhdr() return unsigned. Suggested by: arr --- sys/kern/uipc_mbuf.c | 8 ++++---- sys/sys/mbuf.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 009b812..1ec68bc 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -711,21 +711,21 @@ m_print(const struct mbuf *m) return; } -int +unsigned m_fixhdr(struct mbuf *m0) { - int len; + unsigned len; len = m_length(m0, NULL); m0->m_pkthdr.len = len; return (len); } -int +unsigned m_length(struct mbuf *m0, struct mbuf **last) { struct mbuf *m; - int len; + unsigned len; len = 0; for (m = m0; m != NULL; m = m->m_next) { diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index b4bd624..d4152b8 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -480,7 +480,7 @@ void m_copy_pkthdr(struct mbuf *to, struct mbuf *from); struct mbuf *m_devget(char *, int, int, struct ifnet *, void (*copy)(char *, caddr_t, u_int)); struct mbuf *m_dup(struct mbuf *, int); -int m_fixhdr(struct mbuf *m); +unsigned m_fixhdr(struct mbuf *m); struct mbuf *m_free(struct mbuf *); void m_freem(struct mbuf *); struct mbuf *m_get(int, short); @@ -489,7 +489,7 @@ struct mbuf *m_getcl(int, short, int); struct mbuf *m_gethdr(int, short); struct mbuf *m_gethdr_clrd(int, short); struct mbuf *m_getm(struct mbuf *, int, int, short); -int m_length(struct mbuf *m, struct mbuf **l); +unsigned m_length(struct mbuf *m, struct mbuf **l); struct mbuf *m_prepend(struct mbuf *, int, int); void m_print(const struct mbuf *m); struct mbuf *m_pulldown(struct mbuf *, int, int, int *); -- cgit v1.1