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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/reparsed/reparsed.c
          +++ new/usr/src/cmd/fs.d/reparsed/reparsed.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 2009 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   * Reparsed daemon
  28   32   */
  29   33  
  30   34  #include <stdio.h>
  31   35  #include <stdio_ext.h>
  32   36  #include <stdlib.h>
  33   37  #include <unistd.h>
  34   38  #include <signal.h>
  35   39  #include <sys/types.h>
  36   40  #include <sys/stat.h>
↓ open down ↓ 147 lines elided ↑ open up ↑
 184  188  }
 185  189  
 186  190  static void
 187  191  reparsed_door_call_error(int error, int buflen)
 188  192  {
 189  193          reparsed_door_res_t rpd_res;
 190  194  
 191  195          memset(&rpd_res, 0, sizeof (reparsed_door_res_t));
 192  196          rpd_res.res_status = error;
 193  197          rpd_res.res_len = buflen;
 194      -        door_return((char *)&rpd_res, sizeof (reparsed_door_res_t), NULL, 0);
      198 +        (void) door_return((char *)&rpd_res,
      199 +            sizeof (reparsed_door_res_t), NULL, 0);
 195  200  
 196  201          (void) door_return(NULL, 0, NULL, 0);
 197      -        /* NOTREACHED */
      202 +        abort();
 198  203  }
 199  204  
 200  205  /*
 201  206   *  reparsed_doorfunc
 202  207   *
 203  208   *  argp:  "service_type:service_data" string
 204  209   *  dp & n_desc: not used.
 205  210   */
 206  211  static void
 207  212  reparsed_doorfunc(void *cookie, char *argp, size_t arg_size,
↓ open down ↓ 151 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX