mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 11:10:31 +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>
(cherry picked from commit f0d40201ae)
This commit is contained in:
parent
970552b568
commit
5524f93ff8
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