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/cmd/svc/configd/client.c
          +++ new/usr/src/cmd/svc/configd/client.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2015 RackTop Systems.
       25 + * Copyright 2019 Joyent, Inc.
  25   26   */
  26   27  
  27   28  /*
  28   29   * This is the client layer for svc.configd.  All direct protocol interactions
  29   30   * are handled here.
  30   31   *
  31   32   * Essentially, the job of this layer is to turn the idempotent protocol
  32   33   * into a series of non-idempotent calls into the object layer, while
  33   34   * also handling the necessary locking.
  34   35   */
↓ open down ↓ 1946 lines elided ↑ open up ↑
1981 1982                  case EINVAL:
1982 1983                          /*
1983 1984                           * Door client went away.  This is a normal,
1984 1985                           * although infrequent event, so there is no need
1985 1986                           * to create a syslog message.
1986 1987                           */
1987 1988                          return;
1988 1989                  case EFAULT:
1989 1990                  default:
1990 1991                          bad_error("door_ucred", errno);
1991      -                        return;
1992 1992                  }
1993 1993          }
1994 1994          if (adt_start_session(&session, NULL, 0) != 0) {
1995 1995                  syslog(LOG_ERR, gettext("start_audit_session(): could not "
1996 1996                      "start audit session.\n"));
1997 1997                  ucred_free(cred);
1998 1998                  return;
1999 1999          }
2000 2000          if (adt_set_from_ucred(session, cred, ADT_NEW) != 0) {
2001 2001                  syslog(LOG_ERR, gettext("start_audit_session(): cannot set "
↓ open down ↓ 500 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX