default-route-manager: fix possibly uninitialized variable

src/nm-default-route-manager.c: In function '_ipx_update_default_route':
src/nm-default-route-manager.c:769:23: error: 'is_assumed' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if (!default_route && !is_assumed) {
                       ^
src/nm-default-route-manager.c:763:13: note: 'is_assumed' was declared here
    gboolean is_assumed;
             ^

(cherry picked from commit 857f26dd19)
This commit is contained in:
Dan Williams
2017-04-07 11:27:45 -05:00
parent 0726ab54d6
commit 63bc33122e

View File

@@ -759,7 +759,7 @@ _ipx_update_default_route (const VTableIP *vtable,
/* get the @default_route from the device. */
if (ip_ifindex > 0) {
if (device) {
gboolean is_assumed;
gboolean is_assumed = FALSE;
if (vtable->vt->is_ip4)
default_route = (const NMPlatformIPRoute *) nm_device_get_ip4_default_route (device, &is_assumed);