summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-02-01 13:30:19 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-02-03 11:00:34 +0100
commitb2620e798a3f97e00b949bbb40c5fb0f277a77e9 (patch)
treea6d58f719557d7b73f7ea150a64c3bbf87344c07
parentf3baa7b1d5496564f4119f85b295d56cb940a964 (diff)
downloadNetworkManager-bg/gcc10.tar.gz
n-dhcp4: fix uninitialized variablebg/gcc10
Properly initialize 'overload' when the space in the file section ends. shared/n-dhcp4/src/n-dhcp4-outgoing.c: In function ‘n_dhcp4_outgoing_append’: shared/n-dhcp4/src/n-dhcp4-outgoing.c:198:17: error: ‘overload’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
-rw-r--r--shared/n-dhcp4/src/n-dhcp4-outgoing.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shared/n-dhcp4/src/n-dhcp4-outgoing.c b/shared/n-dhcp4/src/n-dhcp4-outgoing.c
index 9912330886..f8698e6d27 100644
--- a/shared/n-dhcp4/src/n-dhcp4-outgoing.c
+++ b/shared/n-dhcp4/src/n-dhcp4-outgoing.c
@@ -277,6 +277,7 @@ int n_dhcp4_outgoing_append(NDhcp4Outgoing *outgoing,
return 0;
}
+ overload = outgoing->overload;
if (overload & N_DHCP4_OVERLOAD_SNAME)
outgoing->i_message = offsetof(NDhcp4Message, sname);
else