Print this page
11227 smb code needs smatch fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/smbsrv/mbuf.h
          +++ new/usr/src/uts/common/smbsrv/mbuf.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright 2019 Joyent, Inc.
  22   23   * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  23   24   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  /*
  27   28   * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
  28   29   * All rights reserved.
  29   30   *
  30   31   * Redistribution and use in source and binary forms, with or without
  31   32   * modification, are permitted provided that the following conditions
↓ open down ↓ 193 lines elided ↑ open up ↑
 225  226                  (m)->m_ext.ext_ref = smb_mbufcl_ref;            \
 226  227          }
 227  228  
 228  229  /*
 229  230   * MFREE(struct mbuf *m, struct mbuf *nn)
 230  231   * Free a single mbuf and associated external storage.
 231  232   * Place the successor, if any, in nn.
 232  233   */
 233  234  #define MFREE(m, nn) \
 234  235          { \
 235      -                if ((m)->m_flags & M_EXT) {                 \
 236      -                        (*((m)->m_ext.ext_ref))((m)->m_ext.ext_buf,     \
      236 +                if ((m)->m_flags & M_EXT) {                             \
      237 +                        (void) (*((m)->m_ext.ext_ref))                  \
      238 +                            ((m)->m_ext.ext_buf,                        \
 237  239                              (m)->m_ext.ext_size, -1);                   \
 238  240                          (m)->m_ext.ext_buf = 0;                         \
 239  241                  }                                                       \
 240  242                  (nn) = (m)->m_next;                                     \
 241  243                  (m)->m_next = 0;                                        \
 242  244                  smb_mbuf_free(m);                                       \
 243  245          }
 244  246  
 245  247  
 246  248  
↓ open down ↓ 38 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX