From: Bart Van Assche Date: Fri, 25 Aug 2017 20:46:30 +0000 (-0700) Subject: scsi: Convert a strncmp() call into a strcmp() call X-Git-Tag: v4.14-rc1~41^2~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3991e4605dd3a8c7180a5ddd60d802108e880027;p=platform%2Fkernel%2Flinux-exynos.git scsi: Convert a strncmp() call into a strcmp() call This patch avoids that smatch reports the following warning: drivers/scsi/scsi_sysfs.c:117: check_set() error: strncmp() '"-"' too small (2 vs 20) Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 41891db..5ed473a 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -114,7 +114,7 @@ static int check_set(unsigned long long *val, char *src) { char *last; - if (strncmp(src, "-", 20) == 0) { + if (strcmp(src, "-") == 0) { *val = SCAN_WILD_CARD; } else { /*