chore: align getaddrinfo hints copy flow

This commit is contained in:
copilot-swe-agent[bot] 2026-06-09 06:57:25 +00:00 committed by GitHub
parent c7ff65ca6e
commit 7ccb5cbced
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -7058,6 +7058,7 @@ sysret_t sys_getaddrinfo(const char *nodename,
char *k_nodename = NULL;
char *k_servname = NULL;
struct addrinfo *k_hints = NULL;
struct musl_addrinfo k_hints_musl;
struct musl_addrinfo k_res_musl;
struct musl_sockaddr *u_res_ai_addr = NULL;
#ifdef ARCH_MM_MMU
@ -7153,7 +7154,6 @@ sysret_t sys_getaddrinfo(const char *nodename,
if (hints)
{
struct musl_addrinfo k_hints_musl;
#ifdef ARCH_MM_MMU
if (!lwp_user_accessable((void *)hints, sizeof(struct musl_addrinfo)))
{
@ -7214,8 +7214,8 @@ sysret_t sys_getaddrinfo(const char *nodename,
if (hints != NULL)
{
/* copy socktype & protocol from hints if specified */
k_res_musl.ai_socktype = k_hints->ai_socktype;
k_res_musl.ai_protocol = k_hints->ai_protocol;
k_res_musl.ai_socktype = k_hints_musl.ai_socktype;
k_res_musl.ai_protocol = k_hints_musl.ai_protocol;
}
#ifdef ARCH_MM_MMU