diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2006-07-17 09:05:21 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2006-07-17 09:05:21 +0000 |
| commit | eb184de351cc0eed978a1454bb7b7140746a6c54 (patch) | |
| tree | a7814a0ea1d28157e15a307798b176870605e737 | |
| parent | c3759b3a3f3937321c2d00b5f26ec4ab076f2883 (diff) | |
Notes
| -rw-r--r-- | sys/sys/libkern.h | 2 | ||||
| -rw-r--r-- | sys/sys/mbuf.h | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 63c0e17a3881..9cd033bd6d64 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -115,7 +115,7 @@ extern uint32_t crc32_tab[]; static __inline uint32_t crc32_raw(const void *buf, size_t size, uint32_t crc) { - const uint8_t *p = buf; + const uint8_t *p = (const uint8_t *)buf; while (size--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index fee31976f19e..cff5b49ab60a 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -358,7 +358,7 @@ m_get(int how, short type) args.flags = 0; args.type = type; - return (uma_zalloc_arg(zone_mbuf, &args, how)); + return (struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)); } /* XXX This should be depracated, very little use */ @@ -385,7 +385,7 @@ m_gethdr(int how, short type) args.flags = M_PKTHDR; args.type = type; - return (uma_zalloc_arg(zone_mbuf, &args, how)); + return (struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)); } static __inline @@ -396,7 +396,7 @@ m_getcl(int how, short type, int flags) args.flags = flags; args.type = type; - return (uma_zalloc_arg(zone_pack, &args, how)); + return (struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how)); } /* @@ -463,7 +463,7 @@ m_clget(struct mbuf *m, int how) { if (m->m_flags & M_EXT) printf("%s: %p mbuf already has cluster\n", __func__, m); - m->m_ext.ext_buf = NULL; + m->m_ext.ext_buf = (char *)NULL; uma_zalloc_arg(zone_clust, m, how); } @@ -857,8 +857,8 @@ m_tag_get(int type, int length, int wait) static __inline struct m_tag * m_tag_find(struct mbuf *m, int type, struct m_tag *start) { - return (SLIST_EMPTY(&m->m_pkthdr.tags) ? - NULL : m_tag_locate(m, MTAG_ABI_COMPAT, type, start)); + return (SLIST_EMPTY(&m->m_pkthdr.tags) ? (struct m_tag *)NULL : + m_tag_locate(m, MTAG_ABI_COMPAT, type, start)); } #endif /* _KERNEL */ |
