mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 10:10:07 +01:00
cli: fix warning about uninitialized value
gcc warns:
make[4]: Entering directory `./NetworkManager/cli/src'
CC connections.o
connections.c: In function ‘complete_connection_by_type’:
connections.c:4235:18: error: ‘mtu_int’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
g_object_set (s_wired, NM_SETTING_WIRED_MTU, mtu_int, NULL);
^
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
f808c3603a
commit
f0d40201ae
1 changed files with 3 additions and 0 deletions
|
|
@ -2518,6 +2518,9 @@ check_and_convert_mtu (const char *mtu, guint32 *mtu_int, GError **error)
|
|||
{
|
||||
unsigned long local_mtu_int;
|
||||
|
||||
if (mtu_int)
|
||||
*mtu_int = 0;
|
||||
|
||||
if (!mtu)
|
||||
return TRUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue