提交 3991e460 编写于 作者: B Bart Van Assche 提交者: 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: NBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 3bf2ff67
......@@ -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 {
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册