summaryrefslogtreecommitdiff
path: root/src/udev/scsi_id
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/scsi_id')
-rw-r--r--src/udev/scsi_id/scsi_id.c8
-rw-r--r--src/udev/scsi_id/scsi_serial.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index fa0413c462..d664787fd9 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -267,10 +267,10 @@ static int get_file_options(struct udev *udev,
if (vendor == NULL) {
if (vendor_in == NULL)
break;
- } else if ((vendor_in && strncmp(vendor, vendor_in,
- strlen(vendor_in)) == 0) &&
- (!model_in || (strncmp(model, model_in,
- strlen(model_in)) == 0))) {
+ } else if ((vendor_in && strneq(vendor, vendor_in,
+ strlen(vendor_in))) &&
+ (!model_in || (strneq(model, model_in,
+ strlen(model_in))))) {
/*
* Matched vendor and optionally model.
*
diff --git a/src/udev/scsi_id/scsi_serial.c b/src/udev/scsi_id/scsi_serial.c
index 950b8adc0a..d522a23a08 100644
--- a/src/udev/scsi_id/scsi_serial.c
+++ b/src/udev/scsi_id/scsi_serial.c
@@ -436,7 +436,7 @@ static int do_scsi_page0_inquiry(struct udev *udev,
* 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;
}