Print this page
5863 psiginfo arguments should be const
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/gen/psiginfo.c
          +++ new/usr/src/lib/libc/port/gen/psiginfo.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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 +/*
       22 + * Copyright 2015 Circonus, Inc.  All rights reserved.
       23 + */
  21   24  
  22   25  /*
  23   26   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24   27   * Use is subject to license terms.
  25   28   */
  26   29  
  27   30  /*      Copyright (c) 1988 AT&T */
  28   31  /*        All Rights Reserved   */
  29   32  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   33  /*
  33   34   * Print the name of the siginfo indicated by "sig", along with the
  34   35   * supplied message
  35   36   */
  36   37  
  37   38  #include "lint.h"
  38   39  #include "_libc_gettext.h"
  39   40  #include <sys/types.h>
  40   41  #include <stdio.h>
  41   42  #include <unistd.h>
  42   43  #include <string.h>
  43   44  #include <signal.h>
  44   45  #include <siginfo.h>
  45   46  
  46   47  #define strsignal(i)    (_libc_gettext(_sys_siglistp[i]))
  47   48  
  48   49  void
  49      -psiginfo(siginfo_t *sip, char *s)
       50 +psiginfo(const siginfo_t *sip, const char *s)
  50   51  {
  51   52          char buf[256];
  52   53          char *c;
  53   54          const struct siginfolist *listp;
  54   55  
  55   56          if (sip == 0)
  56   57                  return;
  57   58  
  58   59  
  59   60          if (sip->si_code <= 0) {
↓ open down ↓ 29 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX