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:
Bart Van Assche 2017-08-25 13:46:30 -07:00 committed by Martin K. Petersen
parent 3bf2ff6749
commit 3991e4605d
1 changed files with 1 additions and 1 deletions

View File

@ -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 {
/*