9069 libfru: comparison between pointer and zero character constant

Review Request #844 — Created Feb. 7, 2018 and submitted

tsoome
illumos-gate
9069
c3c6997...
general
../raw_access.c: In function 'get_container_info':
../raw_access.c:491:13: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
    if (item == '\0') {
             ^~
../raw_access.c:491:8: note: did you mean to dereference the pointer?
    if (item == '\0') {
        ^
cc1: all warnings being treated as errors


andy_js
  1. 
      
  2. To be consistent with the rest of the code I probably would have changed it to "0x00" or gone through and updated everything to NULL.

    1. oh my... what the....

  3. 
      
tsoome
andy_js
  1. Ship It!
  2. 
      
citrus
  1. Ship It!
  2. 
      
wiedi
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...