Commit 1b376028 authored by Andrew Boie's avatar Andrew Boie Committed by Andrew Boie
Browse files

net: getaddrinfo: ai_state no longer global



Move this onto the call stack of the getaddrinfo() function,
there's no need for it to be global.

Signed-off-by: default avatarAndrew Boie <andrew.p.boie@intel.com>
parent 3bda93a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ struct getaddrinfo_state {
};

static struct zsock_addrinfo ai_arr[2];
static struct getaddrinfo_state ai_state;

static void dns_resolve_cb(enum dns_resolve_status status,
			   struct dns_addrinfo *info, void *user_data)
@@ -88,6 +87,7 @@ int zsock_getaddrinfo(const char *host, const char *service,
	int st1 = DNS_EAI_ADDRFAMILY, st2 = DNS_EAI_ADDRFAMILY;
	struct sockaddr *ai_addr;
	int ret;
	struct getaddrinfo_state ai_state;

	if (hints) {
		family = hints->ai_family;