mirror of https://gitee.com/openkylin/linux.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 <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:
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 {
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue