Print this page
10075 make usr/src/tools smatch clean

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/ctf/ctfstrip/ctfstrip.c
          +++ new/usr/src/tools/ctf/ctfstrip/ctfstrip.c
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2011 Jason King.  All rights reserved.
       14 + * Copyright (c) 2018, Joyent, Inc.
  14   15   */
  15   16  
  16   17  #include <stdlib.h>
  17   18  #include <stdio.h>
  18   19  #include <string.h>
  19   20  #include <unistd.h>
  20   21  #include <sys/types.h>
  21   22  #include <sys/stat.h>
  22   23  #include <sys/wait.h>
  23   24  #include <fcntl.h>
↓ open down ↓ 101 lines elided ↑ open up ↑
 125  126                  }
 126  127          }
 127  128  
 128  129          cmd[4] = filename;
 129  130          if ((rc = posix_spawn(&pid, MCS, NULL, &attr,
 130  131              (char *const *)cmd, environ)) != 0) {
 131  132                  warnx("could not exec mcs: %s", strerror(rc));
 132  133                  return (B_FALSE);
 133  134          }
 134  135  
 135      -        waitpid(pid, &stat, 0);
      136 +        (void) waitpid(pid, &stat, 0);
 136  137          if (!WIFEXITED(stat) || WEXITSTATUS(stat) != 0) {
 137  138                  warnx("Removing CTF information from %s failed", filename);
 138  139                  return (B_FALSE);
 139  140          }
 140  141  
 141  142          if ((mode & S_IWUSR) == 0) {
 142  143                  if (chmod(filename, mode) == -1) {
 143  144                          warn("could not reset permissions of %s", filename);
 144  145                          return (B_FALSE);
 145  146                  }
↓ open down ↓ 11 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX