network: please broken compilers

Some users report that compilation fails because of reports that this
variable can be used uninitialized. Initialize it to silence the
compiler.

Fixes: https://github.com/lxc/lxc/issues/3850
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2021-05-25 14:24:01 +02:00
parent 7cf81ec6f1
commit d41b0293f5
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -1886,7 +1886,8 @@ static int netdev_get_flag(const char *name, int *flag)
*/
int lxc_netdev_isup(const char *name)
{
int err, flag;
int err;
int flag = 0;
err = netdev_get_flag(name, &flag);
if (err)