11434 stmsboot: NULL pointer errors

Review Request #2152 — Created July 11, 2019 and submitted

tsoome
illumos-gate
11434, 11510
0fa9d19...
general
stmsboot_util.c: In function 'parse_args':
stmsboot_util.c:414:36: error: comparison between pointer and integer [-Werror]
    if ((strncmp(drvlimit, "fp", 2) == NULL) &&
                                    ^~
stmsboot_util.c:415:37: error: comparison between pointer and integer [-Werror]
        (strncmp(drvlimit, "mpt", 3) == NULL) &&
                                     ^~
stmsboot_util.c:416:41: error: comparison between pointer and integer [-Werror]
        (strncmp(drvlimit, "mpt_sas", 7) == NULL) &&
                                         ^~
stmsboot_util.c:417:38: error: comparison between pointer and integer [-Werror]
        (strncmp(drvlimit, "pmcs", 4) == NULL)) {
                                      ^~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
citrus
  1. Ship It!
  2. 
      
tsoome
tsoome
tsoome
tsoome
citrus
  1. 
      
  2. usr/src/cmd/stmsboot/stmsboot_util.c (Diff revision 2)
     
     

    Any idea why the original code just checked the prefix?

    Since you're changing this, I'd remove the unecessary brackets.

    1. attempt to optimize?

  3. 
      
tsoome
jlevon
  1. Ship It!
  2. 
      
citrus
  1. Ship It!
  2. 
      
alp
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...