diff options
author | David Disseldorp <ddiss@suse.de> | 2018-10-12 12:01:16 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-16 00:38:36 -0400 |
commit | df711553f4440e16af5b731ed41841dee1e2abb4 (patch) | |
tree | 398266333177dc50e026cbcbd386817c9b154b16 /drivers/target | |
parent | 3bccfba8312762becfb05b35d698ba8cffd440f2 (diff) | |
download | linux-df711553f4440e16af5b731ed41841dee1e2abb4.tar.bz2 |
scsi: target: use ISCSI_IQN_LEN in iscsi_target_stat
Move the ISCSI_IQN_LEN definition up, so that it can be used in more
places instead of a hardcoded value.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_stat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c index df0a39811dc2..bb98882bdaa7 100644 --- a/drivers/target/iscsi/iscsi_target_stat.c +++ b/drivers/target/iscsi/iscsi_target_stat.c @@ -328,10 +328,10 @@ static ssize_t iscsi_stat_tgt_attr_fail_intr_name_show(struct config_item *item, { struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); struct iscsi_login_stats *lstat = &tiqn->login_stats; - unsigned char buf[224]; + unsigned char buf[ISCSI_IQN_LEN]; spin_lock(&lstat->lock); - snprintf(buf, 224, "%s", lstat->last_intr_fail_name[0] ? + snprintf(buf, ISCSI_IQN_LEN, "%s", lstat->last_intr_fail_name[0] ? lstat->last_intr_fail_name : NONE); spin_unlock(&lstat->lock); |