mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 23:48:56 -04:00
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 <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Cc: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
3bf2ff6749
commit
3991e4605d
@@ -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 {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user