Remove unnecessary conversion of __wasi_addr_t to bh_sockaddr_t in sock_recv_from() (#4391)

`src_addr` will be filled upon return. Before the call, its content
is unpredictable.
This commit is contained in:
liang.he 2025-06-19 11:11:35 +08:00 committed by GitHub
parent e3b024413d
commit fc3e8903ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2840,8 +2840,6 @@ wasmtime_ssp_sock_recv_from(wasm_exec_env_t exec_env, struct fd_table *curfds,
return error;
}
wasi_addr_to_bh_sockaddr(src_addr, &sockaddr);
/* Consume bh_sockaddr_t instead of __wasi_addr_t */
ret = blocking_op_socket_recv_from(exec_env, fo->file_handle, buf, buf_len,
0, &sockaddr);