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/ndmpadm/ndmpadm_main.c
          +++ new/usr/src/cmd/ndmpadm/ndmpadm_main.c
   1    1  /*
   2    2   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
   3    3   * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
        4 + * Copyright (c) 2018, Joyent, Inc.
   4    5   */
   5    6  
   6    7  /*
   7    8   * BSD 3 Clause License
   8    9   *
   9   10   * Copyright (c) 2007, The Storage Networking Industry Association.
  10   11   *
  11   12   * Redistribution and use in source and binary forms, with or without
  12   13   * modification, are permitted provided that the following conditions
  13   14   * are met:
↓ open down ↓ 312 lines elided ↑ open up ↑
 326  327  
 327  328  static void
 328  329  ndmp_set_config_process(char *propname)
 329  330  {
 330  331          char *propvalue;
 331  332          int ret, j;
 332  333  
 333  334          if ((propvalue = strchr(propname, '=')) == NULL) {
 334  335                  (void) fprintf(stderr, gettext("Missing value in "
 335  336                      "property=value argument for %s\n"), propname);
 336      -                        return;
      337 +                return;
 337  338          }
 338  339          *propvalue = '\0';
 339  340          propvalue++;
 340  341  
 341  342          if (*propname == '\0') {
 342  343                  (void) fprintf(stderr, gettext("Missing property in "
 343  344                      "property=value argument for %s\n"), propname);
 344      -                        return;
      345 +                return;
 345  346          }
 346  347          for (j = 0; j < NDMPADM_NPROP; j++) {
 347  348                  if (strcmp(propname, prop_table[j]) == 0)
 348  349                          break;
 349  350          }
 350  351          if (j == NDMPADM_NPROP) {
 351  352                  (void) fprintf(stdout, gettext("%s is invalid property or "
 352  353                      "variable\n"), propname);
 353  354                  return;
 354  355          }
↓ open down ↓ 151 lines elided ↑ open up ↑
 506  507          /* If no arg is specified, print the usage and exit */
 507  508          if (argc == 1)
 508  509                  usage(B_FALSE, cur_cmd);
 509  510  
 510  511          for (i = 1; i < argc; i++) {
 511  512                  if (atoi(argv[i]) > 0) {
 512  513                          ret = ndmp_terminate_session(atoi(argv[i]));
 513  514                  } else {
 514  515                          (void) fprintf(stderr,
 515  516                              gettext("Invalid argument %s\n"), argv[i]);
 516      -                                continue;
      517 +                        continue;
 517  518                  }
 518  519                  if (ret == -1)
 519  520                          (void) fprintf(stdout,
 520  521                              gettext("Session id %d not found.\n"),
 521  522                              atoi(argv[i]));
 522  523          }
 523  524          return (0);
 524  525  }
 525  526  
 526  527  static int
↓ open down ↓ 229 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX