Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys const mbuftypes



details:   https://anonhg.NetBSD.org/src/rev/c9dda4409301
branches:  trunk
changeset: 332035:c9dda4409301
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Sep 05 05:48:59 2014 +0000

description:
const mbuftypes
explicitly cast assignments to ext_buf

diffstat:

 sys/sys/mbuf.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r fe712a916039 -r c9dda4409301 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Fri Sep 05 05:47:40 2014 +0000
+++ b/sys/sys/mbuf.h    Fri Sep 05 05:48:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.155 2014/05/17 23:27:59 rmind Exp $ */
+/*     $NetBSD: mbuf.h,v 1.156 2014/09/05 05:48:59 matt Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -379,7 +379,7 @@
 #define MT_OOBDATA     7       /* expedited data  */
 
 #ifdef MBUFTYPES
-static const char *mbuftypes[] = {
+static const char * const mbuftypes[] = {
        "mbfree",
        "mbdata",
        "mbheader",
@@ -482,7 +482,7 @@
 
 #define        _MCLGET(m, pool_cache, size, how)                               \
 do {                                                                   \
-       (m)->m_ext_storage.ext_buf =                                    \
+       (m)->m_ext_storage.ext_buf = (char *)                           \
            pool_cache_get_paddr((pool_cache),                          \
                (how) == M_WAIT ? (PR_WAITOK|PR_LIMITFAIL) : 0,         \
                &(m)->m_ext_storage.ext_paddr);                         \
@@ -507,7 +507,7 @@
 
 #define        MEXTMALLOC(m, size, how)                                        \
 do {                                                                   \
-       (m)->m_ext_storage.ext_buf =                                    \
+       (m)->m_ext_storage.ext_buf = (char *)                           \
            malloc((size), mbtypes[(m)->m_type], (how));                \
        if ((m)->m_ext_storage.ext_buf != NULL) {                       \
                MCLINITREFERENCE(m);                                    \
@@ -525,7 +525,7 @@
 #define        MEXTADD(m, buf, size, type, free, arg)                          \
 do {                                                                   \
        MCLINITREFERENCE(m);                                            \
-       (m)->m_data = (m)->m_ext.ext_buf = (void *)(buf);               \
+       (m)->m_data = (m)->m_ext.ext_buf = (char *)(buf);               \
        (m)->m_flags = ((m)->m_flags & ~M_EXTCOPYFLAGS) | M_EXT;        \
        (m)->m_ext.ext_flags = 0;                                       \
        (m)->m_ext.ext_size = (size);                                   \



Home | Main Index | Thread Index | Old Index