Commit 9f3afd33 authored by Gerson Fernando Budke's avatar Gerson Fernando Budke Committed by Anas Nashif
Browse files

lib: updatehub: Init hints variable

The hints variable is used without a defined state. This fill the struct
with zeros to set variable at a well known state.

Signed-off-by: default avatarGerson Fernando Budke <gerson.budke@ossystems.com.br>
parent 5e3922e4
Loading
Loading
Loading
Loading
+2 −0
Changes for lib/updatehub/updatehub.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -153,6 +153,8 @@ static bool start_coap_client(void)
	int resolve_attempts = 10;
	int ret = -1;

	memset(&hints, 0, sizeof(hints));

	if (IS_ENABLED(CONFIG_NET_IPV6)) {
		hints.ai_family = AF_INET6;
		hints.ai_socktype = SOCK_STREAM;