Skip to content

Commit 25e1b88

Browse files
larochedanieldegrasse
authored andcommitted
net: dns: is_server_name_found(): fix return code check
In is_server_name_found() fix the return code checking of net_addr_ntop(). Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
1 parent 7d5902d commit 25e1b88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/lib/dns/resolve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static bool is_server_name_found(struct dns_resolve_context *ctx,
427427

428428
if (net_addr_ntop(ctx->servers[i].dns_server.sa_family,
429429
&net_sin(&ctx->servers[i].dns_server)->sin_addr,
430-
addr_str, sizeof(addr_str)) < 0) {
430+
addr_str, sizeof(addr_str)) == NULL) {
431431
continue;
432432
}
433433

0 commit comments

Comments
 (0)