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/ucodeadm/ucodeadm.c
          +++ new/usr/src/cmd/ucodeadm/ucodeadm.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 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
       26 +/*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
       29 +
  26   30  #include <sys/types.h>
  27   31  #include <sys/processor.h>
  28   32  #include <sys/ucode.h>
  29   33  #include <sys/ioctl.h>
  30   34  #include <sys/stat.h>
  31   35  #include <unistd.h>
  32   36  #include <dirent.h>
  33   37  #include <fcntl.h>
  34   38  #include <errno.h>
  35   39  #include <stdio.h>
↓ open down ↓ 625 lines elided ↑ open up ↑
 661  665                  rc = EM_SYS;
 662  666                  ucode_perror(ucode_dev, rc);
 663  667                  goto err_out;
 664  668          }
 665  669  
 666  670          if (action & UCODE_OPT_VERSION) {
 667  671                  int tmprc;
 668  672                  uint32_t *revp = NULL;
 669  673                  int i;
 670  674  #if defined(_SYSCALL32_IMPL)
 671      -        struct ucode_get_rev_struct32 inf32;
      675 +                struct ucode_get_rev_struct32 inf32;
 672  676  #else
 673      -        struct ucode_get_rev_struct info;
      677 +                struct ucode_get_rev_struct info;
 674  678  #endif
 675  679  
 676  680                  cpuid_max = (processorid_t)sysconf(_SC_CPUID_MAX);
 677  681  
 678  682                  if ((revp = (uint32_t *)
 679  683                      malloc(cpuid_max * sizeof (uint32_t))) == NULL) {
 680  684                          rc = EM_SYS;
 681  685                          ucode_perror("malloc", rc);
 682  686                          goto err_out;
 683  687                  }
↓ open down ↓ 30 lines elided ↑ open up ↑
 714  718                          ucode_perror(gettext("get microcode version"), rc);
 715  719                  }
 716  720  
 717  721                  if (revp)
 718  722                          free(revp);
 719  723          }
 720  724  
 721  725          if (action & UCODE_OPT_UPDATE) {
 722  726                  int tmprc;
 723  727  #if defined(_SYSCALL32_IMPL)
 724      -        struct ucode_write_struct32 uw_struct32;
      728 +                struct ucode_write_struct32 uw_struct32;
 725  729  #else
 726      -        struct ucode_write_struct uw_struct;
      730 +                struct ucode_write_struct uw_struct;
 727  731  #endif
 728  732  
 729  733  #if defined(_SYSCALL32_IMPL)
 730  734                  uw_struct32.uw_size = ucode_size;
 731  735                  uw_struct32.uw_ucode = (caddr32_t)buf;
 732  736                  uw_struct32.uw_errno = EM_OK;
 733  737                  tmprc = ioctl(dev_fd, UCODE_UPDATE, &uw_struct32);
 734  738                  rc = uw_struct32.uw_errno;
 735  739  
 736  740  #else
↓ open down ↓ 34 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX