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/file-locking/runtests.c
          +++ new/usr/src/test/os-tests/tests/file-locking/runtests.c
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   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      - * Copyright 2018 Joyent, Inc.
       13 + * Copyright 2019 Joyent, Inc.
  14   14   */
  15   15  
  16   16  /*
  17   17   * Validate various fcntl(2) and flock(3C) operations.
  18   18   */
  19   19  
  20   20  #include "util.h"
  21   21  #include <err.h>
  22   22  #include <errno.h>
  23   23  #include <fcntl.h>
↓ open down ↓ 296 lines elided ↑ open up ↑
 320  320  
 321  321                  err(EXIT_FAILURE, "Failed to wait on child");
 322  322          }
 323  323  
 324  324          if (WIFEXITED(childstat)) {
 325  325                  return (WEXITSTATUS(childstat));
 326  326          } else if (WIFSIGNALED(childstat)) {
 327  327                  return (1);
 328  328          } else {
 329  329                  abort();
 330      -                return (1);
 331  330          }
 332  331  }
 333  332  
 334  333  
 335  334  static void
 336  335  flock_cleanup_child(pid_t pid, int fds[])
 337  336  {
 338  337          (void) flock_wait(pid);
 339  338          (void) close(fds[0]);
 340  339          (void) close(fds[1]);
↓ open down ↓ 365 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX