network: silence gcc-8

parent 00a3088c
...@@ -2097,8 +2097,8 @@ static int lxc_create_network_unpriv_exec(const char *lxcpath, const char *lxcna ...@@ -2097,8 +2097,8 @@ static int lxc_create_network_unpriv_exec(const char *lxcpath, const char *lxcna
return -1; return -1;
} }
memset(netdev->name, 0, IFNAMSIZ + 1); memset(netdev->name, 0, IFNAMSIZ);
strncpy(netdev->name, token, IFNAMSIZ); memcpy(netdev->name, token, IFNAMSIZ - 1);
/* netdev->ifindex */ /* netdev->ifindex */
token = strtok_r(NULL, ":", &saveptr); token = strtok_r(NULL, ":", &saveptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment