summaryrefslogtreecommitdiff
path: root/ztd-eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'ztd-eth.c')
-rw-r--r--ztd-eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ztd-eth.c b/ztd-eth.c
index a5d8f83..72aab86 100644
--- a/ztd-eth.c
+++ b/ztd-eth.c
@@ -297,12 +297,12 @@ static void *ztdeth_create(struct zt_span *span, char *addr)
memset(z, 0, sizeof(struct ztdeth));
/* Address should be <dev>/<macaddr>[/subaddr] */
- strncpy(tmp, addr, sizeof(tmp) - 1);
+ zap_copy_string(tmp, addr, sizeof(tmp));
tmp2 = strchr(tmp, '/');
if (tmp2) {
*tmp2 = '\0';
tmp2++;
- strncpy(z->ethdev, tmp, sizeof(z->ethdev) - 1);
+ zap_copy_string(z->ethdev, tmp, sizeof(z->ethdev));
} else {
printk("Invalid TDMoE address (no device) '%s'\n", addr);
kfree(z);