mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-05 07:51:10 +00:00
coverity: #1425825
Unchecked return value Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
1a836092b5
commit
d34212adc2
@ -123,7 +123,10 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
|
||||
memcpy(netdev->priv.veth_attr.veth1, veth1, IFNAMSIZ);
|
||||
}
|
||||
|
||||
snprintf(veth2buf, sizeof(veth2buf), "vethXXXXXX");
|
||||
err = snprintf(veth2buf, sizeof(veth2buf), "vethXXXXXX");
|
||||
if (err < 0 || (size_t)err >= sizeof(veth2buf))
|
||||
return -1;
|
||||
|
||||
veth2 = lxc_mkifname(veth2buf);
|
||||
if (!veth2)
|
||||
goto out_delete;
|
||||
|
Loading…
Reference in New Issue
Block a user