Print this page
10126 smatch fix for kmfcfg

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-crypto/kmfcfg/kmfcfg.c
          +++ new/usr/src/cmd/cmd-crypto/kmfcfg/kmfcfg.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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   21   * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  22   22   */
  23   23  
       24 +/*
       25 + * Copyright (c) 2018, Joyent, Inc.
       26 + */
       27 +
  24   28  #include <stdio.h>
  25   29  #include <strings.h>
  26   30  #include <ctype.h>
  27   31  #include <libgen.h>
  28   32  #include <libintl.h>
  29   33  #include <locale.h>
  30   34  
  31   35  #include <kmfapiP.h>
  32   36  
  33   37  #include "util.h"
↓ open down ↓ 148 lines elided ↑ open up ↑
 182  186          int found;
 183  187          int i;
 184  188  
 185  189          (void) setlocale(LC_ALL, "");
 186  190  #if !defined(TEXT_DOMAIN)               /* Should be defined by cc -D. */
 187  191  #define TEXT_DOMAIN     "SYS_TEST"      /* Use this only if it isn't. */
 188  192  #endif
 189  193          (void) textdomain(TEXT_DOMAIN);
 190  194  
 191  195          prog = basename(argv[0]);
 192      -        argv++; argc--;
      196 +        argv++;
      197 +        argc--;
 193  198  
 194  199          if (argc == 0) {
 195  200                  usage();
 196  201                  exit(1);
 197  202          }
 198  203  
 199  204          if (argc == 1 && argv[0][0] == '-') {
 200  205                  switch (argv[0][1]) {
 201  206                          case '?':
 202  207                                  return (kc_help());
↓ open down ↓ 65 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX