diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-25 13:46:30 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-25 17:08:07 -0400 |
commit | 3991e4605dd3a8c7180a5ddd60d802108e880027 (patch) | |
tree | 425d02afe28587e4cdf8335cfa9a9dc1e333b660 /drivers/scsi | |
parent | 3bf2ff6749f0f87d719bf8f67eccecfde742f2b3 (diff) |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 41891db20108..5ed473a87589 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -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 { /* |