* If the vendor id appears in the page assume the page is
* invalid.
*/
- if (!strncmp((char *)&buffer[VENDOR_LENGTH], dev_scsi->vendor, VENDOR_LENGTH)) {
+ if (strneq((char *)&buffer[VENDOR_LENGTH], dev_scsi->vendor, VENDOR_LENGTH)) {
log_debug("%s: invalid page0 data\n", dev_scsi->kernel);
return 1;
}
ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
if (ser_ind < 0)
return 1;
- ser_ind++; /* for the leading 'S' */
+ ser_ind++; /* for the leading 'S' */
for (i = 4; i < len + 4; i++, ser_ind++)
serial[ser_ind] = buf[i];
}
}
} else if (page_code != 0x00) {
log_debug("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code);
- return 1;
+ retval = 1;
+ goto completed;
}
/*