s390/qeth: replace deprecated strncpy with strscpy
[linux-2.6-microblaze.git] / drivers / s390 / net / qeth_core_main.c
index cd78329..6af2511 100644 (file)
@@ -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);