summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/ctcm_main.c4
-rw-r--r--drivers/s390/net/qeth_core_main.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index 6faf27136024..ac15d7c2b200 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -200,13 +200,13 @@ static void channel_free(struct channel *ch)
static void channel_remove(struct channel *ch)
{
struct channel **c = &channels;
- char chid[CTCM_ID_SIZE+1];
+ char chid[CTCM_ID_SIZE];
int ok = 0;
if (ch == NULL)
return;
else
- strncpy(chid, ch->id, CTCM_ID_SIZE);
+ strscpy(chid, ch->id, sizeof(chid));
channel_free(ch);
while (*c) {
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index cd783290bde5..6af2511e070c 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -6226,7 +6226,7 @@ static int qeth_add_dbf_entry(struct qeth_card *card, char *name)
new_entry = kzalloc(sizeof(struct qeth_dbf_entry), GFP_KERNEL);
if (!new_entry)
goto err_dbg;
- strncpy(new_entry->dbf_name, name, DBF_NAME_LEN);
+ strscpy(new_entry->dbf_name, name, sizeof(new_entry->dbf_name));
new_entry->dbf_info = card->debug;
mutex_lock(&qeth_dbf_list_mutex);
list_add(&new_entry->dbf_list, &qeth_dbf_list);