Print this page
6139 help gcc figure out variable initialization

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/modload/plcysubr.c
          +++ new/usr/src/cmd/modload/plcysubr.c
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   *
  26   26   * Device policy specific subroutines.  We cannot merge them with
  27   27   * drvsubr.c because of static linking requirements.
  28   28   */
  29   29  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   30  #include <stdio.h>
  33   31  #include <stdlib.h>
  34   32  #include <unistd.h>
  35   33  #include <string.h>
  36   34  #include <ctype.h>
  37   35  #include <priv.h>
  38   36  #include <string.h>
  39   37  #include <libgen.h>
  40   38  #include <libintl.h>
  41   39  #include <errno.h>
↓ open down ↓ 288 lines elided ↑ open up ↑
 330  328                          break;
 331  329                  }
 332  330  
 333  331                  /* Make sure we can recover the remainder incl. whitespace */
 334  332                  tail = strpbrk(tok, "\t\n ");
 335  333                  if (tail == NULL)
 336  334                          tail = tok + strlen(tok);
 337  335                  tc = *tail;
 338  336                  *tail = '\0';
 339  337  
 340      -                if (delall || delrange) {
 341      -                        min = strchr(tok, ':');
 342      -                        if (min)
 343      -                                *min++ = '\0';
 344      -                }
      338 +                min = strchr(tok, ':');
      339 +                if (min && (delall || delrange))
      340 +                        *min++ = '\0';
 345  341  
 346  342                  len = strlen(tok);
 347  343                  if (delrange) {
 348  344                          minor_t lo, hi;
 349  345                          char type;
 350  346  
 351  347                          /*
 352  348                           * Delete or shrink overlapping ranges.
 353  349                           */
 354  350                          if (strncmp(entry, tok, len) == 0 &&
↓ open down ↓ 344 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX