mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
usrsock: Make the field of usrsock_request native alignment
There is a risk that interfaces such as psock_ioctl/psock_setsockopt will cause paramete to be not four-byte aligned after calculating the offset, so align the length of the structure with parameters by four bytes. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -94,7 +94,6 @@ static int usrsock_rpmsg_send_dns_request(FAR void *arg,
|
||||
|
||||
dns->head.reqid = USRSOCK_RPMSG_DNS_REQUEST;
|
||||
dns->head.xid = 0;
|
||||
dns->head.reserved = 0;
|
||||
dns->addrlen = addrlen;
|
||||
memcpy(dns + 1, addr, addrlen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user