Print this page
10102 libnvfru needs smatch fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libfru/libnvfru/nvfru.c
          +++ new/usr/src/lib/libfru/libnvfru/nvfru.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright (c) 2014 Gary Mills
  24   24   *
  25   25   * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
       26 + *
       27 + * Copyright (c) 2018, Joyent, Inc.
  26   28   */
  27   29  
  28   30  #include <stdio.h>
  29   31  #include <stdlib.h>
  30   32  #include <stdint.h>
  31   33  #include <strings.h>
  32   34  #include <assert.h>
  33   35  #include <pthread.h>
  34   36  #include <sys/byteorder.h>
  35   37  #include <sys/types.h>
↓ open down ↓ 359 lines elided ↑ open up ↑
 395  397                  return (-1);
 396  398          }
 397  399          fru_err = fru_get_root(&hdl);
 398  400          if (fru_err != FRU_SUCCESS) {
 399  401                  (void) pthread_mutex_unlock(&gLock);
 400  402                  return (-1);
 401  403          }
 402  404  
 403  405          err = convert_fru(hdl, nvlist);
 404  406  
 405      -        fru_close_data_source();
      407 +        (void) fru_close_data_source();
 406  408  
 407  409          (void) pthread_mutex_unlock(&gLock);
 408  410  
 409  411          return (err);
 410  412  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX