Print this page
12326 hal: the value of *n_speeds should increase rather than the pointer

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/hal/utils/cdutils.c
          +++ new/usr/src/cmd/hal/utils/cdutils.c
   1    1  /***************************************************************************
   2    2   *
   3    3   * cdutils.c : CD/DVD utilities
   4    4   *
   5      - * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
        5 + * Copyright 2006, 2015, Oracle and/or its affiliates. All rights reserved.
   6    6   * Use is subject to license terms.
   7    7   *
   8    8   * Licensed under the Academic Free License version 2.1
   9    9   *
  10   10   **************************************************************************/
  11   11  
  12   12  
  13   13  #ifdef HAVE_CONFIG_H
  14   14  #  include <config.h>
  15   15  #endif
↓ open down ↓ 287 lines elided ↑ open up ↑
 303  303                          if (current->val == (*nextp)->val) {
 304  304                                  skip = B_TRUE; /* skip duplicates */
 305  305                                  break;
 306  306                          } else if (current->val > (*nextp)->val) {
 307  307                                  break;
 308  308                          }
 309  309                  }
 310  310                  if (!skip) {
 311  311                          current->next = *nextp;
 312  312                          *nextp = current;
 313      -                        *n_speeds++;
      313 +                        (*n_speeds)++;
 314  314                  }
 315  315          }
 316  316  }
 317  317  
 318  318  void
 319  319  get_read_write_speeds(int fd, int *read_speed, int *write_speed,
 320  320      intlist_t **speeds, int *n_speeds, intlist_t **speeds_mem)
 321  321  {
 322  322          int page_len;
 323  323          uchar_t p[254];
↓ open down ↓ 181 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX