Print this page
10135 picl plugins need smatch fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c
          +++ new/usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright (c) 2018, Joyent, Inc.
  24   26   */
  25   27  
  26   28  /*
  27   29   * This plugin creates memory configuration nodes and properties in the
  28   30   * PICL tree for Cheetah platforms.
  29   31   *
  30   32   * Subtree of memory-controller in the physical aspect.
  31   33   * memory-controller --- memory-module-group --- memory-module
  32   34   *
  33   35   * Subtree of memory in the logical aspect.
↓ open down ↓ 381 lines elided ↑ open up ↑
 415  417                  err = ptree_create_and_add_node(memh, PICL_NAME_MEMORY_SEGMENT,
 416  418                      PICL_CLASS_MEMORY_SEGMENT, &msegh);
 417  419                  if (err != PICL_SUCCESS)
 418  420                          break;
 419  421  
 420  422                  msegh_info[i] = msegh;
 421  423  
 422  424                  /*
 423  425                   * Add property, Size to memory-segment node
 424  426                   */
 425      -                if ((ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
      427 +                err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
 426  428                      PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (mcseg->size),
 427      -                    PICL_PROP_SIZE, NULL, NULL)) != PICL_SUCCESS)
      429 +                    PICL_PROP_SIZE, NULL, NULL);
 428  430                  if (err != PICL_SUCCESS)
 429  431                          break;
 430  432  
 431  433                  memsize += mcseg->size;
 432  434                  err = ptree_create_and_add_prop(msegh, &propinfo, &mcseg->size,
 433  435                      NULL);
 434  436                  if (err != PICL_SUCCESS)
 435  437                          break;
 436  438  
 437  439                  /*
↓ open down ↓ 512 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX