Print this page
10120 smatch indenting fixes for usr/src/cmd
Reviewed by: Gergő Doma <domag02@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/auditconfig/auditconfig.c
          +++ new/usr/src/cmd/auditconfig/auditconfig.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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   * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  
  25   25  /*
       26 + * Copyright (c) 2019, Joyent, Inc.
       27 + */
       28 +
       29 +/*
  26   30   * auditconfig - set and display audit parameters
  27   31   */
  28   32  
  29   33  #include <locale.h>
  30   34  #include <sys/types.h>
  31   35  #include <ctype.h>
  32   36  #include <stdlib.h>
  33   37  #include <stdarg.h>
  34   38  #include <unistd.h>
  35   39  #include <errno.h>
↓ open down ↓ 2529 lines elided ↑ open up ↑
2565 2569          return (1);
2566 2570  }
2567 2571  
2568 2572  
2569 2573  static int
2570 2574  strisnum(char *s)
2571 2575  {
2572 2576          if (s == NULL || !*s)
2573 2577                  return (0);
2574 2578  
2575      -        for (; *s == '-' || *s == '+'; s++)
     2579 +        for (; *s == '-' || *s == '+'; s++) {
     2580 +                if (!*s)
     2581 +                        return (0);
     2582 +        }
2576 2583  
2577      -        if (!*s)
2578      -                return (0);
2579      -
2580      -        for (; *s; s++)
     2584 +        for (; *s; s++) {
2581 2585                  if (!isdigit(*s))
2582 2586                          return (0);
     2587 +        }
2583 2588  
2584 2589          return (1);
2585 2590  }
2586 2591  
2587 2592  static int
2588 2593  strisipaddr(char *s)
2589 2594  {
2590 2595          int dot = 0;
2591 2596          int colon = 0;
2592 2597  
↓ open down ↓ 360 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX