Zebediah Figura : include: Add some structure size assertions.
Alexandre Julliard
julliard at winehq.org
Fri Dec 10 15:07:52 CST 2021
Module: wine
Branch: master
Commit: 3821e0391733170906cca236a437422ee6cf40e6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3821e0391733170906cca236a437422ee6cf40e6
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Fri Dec 10 11:27:30 2021 -0600
include: Add some structure size assertions.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/afd.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/wine/afd.h b/include/wine/afd.h
index 3b8bdcb9e5d..1d24c679c75 100644
--- a/include/wine/afd.h
+++ b/include/wine/afd.h
@@ -76,6 +76,7 @@ struct afd_bind_params
int unknown;
struct WS(sockaddr) addr; /* variable size */
};
+C_ASSERT( sizeof(struct afd_bind_params) == 20 );
struct afd_listen_params
{
@@ -83,6 +84,7 @@ struct afd_listen_params
int backlog;
int unknown2;
};
+C_ASSERT( sizeof(struct afd_listen_params) == 12 );
#define AFD_RECV_FORCE_ASYNC 0x2
@@ -138,6 +140,7 @@ struct afd_get_events_params
int flags;
NTSTATUS status[13];
};
+C_ASSERT( sizeof(struct afd_get_events_params) == 56 );
#define WINE_AFD_IOC(x) CTL_CODE(FILE_DEVICE_NETWORK, x, METHOD_BUFFERED, FILE_ANY_ACCESS)
@@ -244,12 +247,14 @@ struct afd_create_params
int family, type, protocol;
unsigned int flags;
};
+C_ASSERT( sizeof(struct afd_create_params) == 16 );
struct afd_accept_into_params
{
ULONG accept_handle;
unsigned int recv_len, local_len;
};
+C_ASSERT( sizeof(struct afd_accept_into_params) == 12 );
struct afd_connect_params
{
@@ -258,6 +263,7 @@ struct afd_connect_params
/* VARARG(addr, struct WS(sockaddr), addr_len); */
/* VARARG(data, bytes); */
};
+C_ASSERT( sizeof(struct afd_connect_params) == 8 );
struct afd_recvmsg_params
{
@@ -297,10 +303,12 @@ struct afd_message_select_params
unsigned int message;
int mask;
};
+C_ASSERT( sizeof(struct afd_message_select_params) == 16 );
struct afd_get_info_params
{
int family, type, protocol;
};
+C_ASSERT( sizeof(struct afd_get_info_params) == 12 );
#endif
More information about the wine-cvs
mailing list