Commit 3991e460 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

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: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3bf2ff67
...@@ -114,7 +114,7 @@ static int check_set(unsigned long long *val, char *src) ...@@ -114,7 +114,7 @@ static int check_set(unsigned long long *val, char *src)
{ {
char *last; char *last;
if (strncmp(src, "-", 20) == 0) { if (strcmp(src, "-") == 0) {
*val = SCAN_WILD_CARD; *val = SCAN_WILD_CARD;
} else { } else {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment