aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx/ql4_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 675332e49a7b..17cccd14765f 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -799,10 +799,10 @@ static int qla4xxx_get_chap_list(struct Scsi_Host *shost, uint16_t chap_tbl_idx,
chap_rec->chap_tbl_idx = i;
strscpy(chap_rec->username, chap_table->name,
- ISCSI_CHAP_AUTH_NAME_MAX_LEN);
- strscpy(chap_rec->password, chap_table->secret,
- QL4_CHAP_MAX_SECRET_LEN);
- chap_rec->password_length = chap_table->secret_len;
+ sizeof(chap_rec->username));
+ chap_rec->password_length = strscpy(chap_rec->password,
+ chap_table->secret,
+ sizeof(chap_rec->password));
if (chap_table->flags & BIT_7) /* local */
chap_rec->chap_type = CHAP_TYPE_OUT;
@@ -6291,8 +6291,8 @@ static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry,
tddb->tpgt = sess->tpgt;
tddb->port = conn->persistent_port;
- strscpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE);
- strscpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN);
+ strscpy(tddb->iscsi_name, sess->targetname, sizeof(tddb->iscsi_name));
+ strscpy(tddb->ip_addr, conn->persistent_address, sizeof(tddb->ip_addr));
}
static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry,
@@ -7792,7 +7792,7 @@ static int qla4xxx_sysfs_ddb_logout(struct iscsi_bus_flash_session *fnode_sess,
}
strscpy(flash_tddb->iscsi_name, fnode_sess->targetname,
- ISCSI_NAME_SIZE);
+ sizeof(flash_tddb->iscsi_name));
if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4))
sprintf(flash_tddb->ip_addr, "%pI6", fnode_conn->ipaddress);