Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/test/os-tests/tests/sockfs/conn.c
          +++ new/usr/src/test/os-tests/tests/sockfs/conn.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15   15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16   16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17   17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18   18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19   19   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20   20   * DEALINGS IN THE SOFTWARE.
  21   21   */
  22   22  
       23 +/*
       24 + * Copyright 2019 Joyent, Inc.
       25 + */
       26 +
  23   27  #include <sys/param.h>
  24   28  #include <sys/types.h>
  25   29  #include <sys/stat.h>
  26   30  #include <sys/socket.h>
  27   31  #include <sys/un.h>
  28   32  #include <stdio.h>
  29   33  #include <unistd.h>
  30   34  #include <string.h>
  31   35  #include <errno.h>
  32   36  #include <stdint.h>
↓ open down ↓ 74 lines elided ↑ open up ↑
 107  111                  }
 108  112  
 109  113                  /* start worker */
 110  114                  ret = pthread_create(NULL, NULL, server, (void *)asock);
 111  115                  if (ret == -1) {
 112  116                          fprintf(stderr, "%s - thread create fail %s\n",
 113  117                              __progname, strerror(errno));
 114  118                          exit(1);
 115  119                  }
 116  120          }
 117      -
 118      -        exit(0);
 119  121  }
 120  122  
 121  123  /*
 122  124   * This should be a place only root is allowed to write.
 123  125   * The test will create and destroy this directory.
 124  126   */
 125  127  char testdir[100] = "/var/run/os-tests-sockfs";
 126  128  struct sockaddr_un addr;
 127  129  int test_uid = UID_NOBODY;
 128  130  
↓ open down ↓ 92 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX