Print this page
10133 smatch fixes for usr/src/cmd/fs.d

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/smbclnt/umount/umount.c
          +++ new/usr/src/cmd/fs.d/smbclnt/umount/umount.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  /*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
       29 +
       30 +/*
  27   31   * smbfs umount
  28   32   */
  29   33  
  30   34  #include <stdio.h>
  31   35  #include <stdlib.h>
  32   36  #include <string.h>
  33   37  #include <stdarg.h>
  34   38  #include <signal.h>
  35   39  #include <unistd.h>
  36   40  #include <kstat.h>
↓ open down ↓ 135 lines elided ↑ open up ↑
 172  176          }
 173  177          while (getextmntent(fp, &mnt, sizeof (struct extmnttab)) == 0) {
 174  178                  if (strcmp(mnt.mnt_mountp, dirname) == 0 ||
 175  179                      strcmp(mnt.mnt_special, dirname) == 0) {
 176  180                          if (res)
 177  181                                  fsfreemnttab(res);
 178  182                          res = fsdupmnttab(&mnt);
 179  183                  }
 180  184          }
 181  185  
 182      -        fclose(fp);
      186 +        (void) fclose(fp);
 183  187          return (res);
 184  188  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX