From: Yu Watanabe Date: Fri, 16 Mar 2018 09:29:57 +0000 (+0900) Subject: udev: use startswith() instead of the combination of strneq() and strlen() (#8459) X-Git-Tag: v239~545 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0caa99466d63aea1180f0b93838428e907c919da;p=thirdparty%2Fsystemd.git udev: use startswith() instead of the combination of strneq() and strlen() (#8459) --- diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c index 32c1a8def43..63d27560390 100644 --- a/src/udev/scsi_id/scsi_id.c +++ b/src/udev/scsi_id/scsi_id.c @@ -259,9 +259,8 @@ static int get_file_options(struct udev *udev, if (vendor_in == NULL) break; } else if (vendor_in && - strneq(vendor, vendor_in, strlen(vendor_in)) && - (!model_in || - (strneq(model, model_in, strlen(model_in))))) { + startswith(vendor, vendor_in) && + (!model_in || startswith(model, model_in))) { /* * Matched vendor and optionally model. *