From: Rémi Bernon rbernon@codeweavers.com
Avoid field alignment issues as NB_HOOKS is odd. --- dlls/win32u/hook.c | 4 +--- server/hook.c | 4 ---- server/protocol.def | 4 +++- 3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/win32u/hook.c b/dlls/win32u/hook.c index b1a154c6fb7..b0f49e84b65 100644 --- a/dlls/win32u/hook.c +++ b/dlls/win32u/hook.c @@ -31,9 +31,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(hook);
-#define WH_WINEVENT (WH_MAXHOOK+1) - -static const char * const hook_names[WH_WINEVENT - WH_MINHOOK + 1] = +static const char * const hook_names[NB_HOOKS] = { "WH_MSGFILTER", "WH_JOURNALRECORD", diff --git a/server/hook.c b/server/hook.c index e53ba4514bf..fe3c0459651 100644 --- a/server/hook.c +++ b/server/hook.c @@ -58,10 +58,6 @@ struct hook data_size_t module_size; };
-#define WH_WINEVENT (WH_MAXHOOK+1) - -#define NB_HOOKS (WH_WINEVENT-WH_MINHOOK+1) - struct hook_table { struct object obj; /* object header */ diff --git a/server/protocol.def b/server/protocol.def index 0c8be12314a..d5f86070c76 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -978,6 +978,8 @@ struct obj_locator };
#define MAX_ATOM_LEN 255 +#define WH_WINEVENT (WH_MAXHOOK + 1) +#define NB_HOOKS (WH_WINEVENT - WH_MINHOOK + 1)
struct shared_cursor { @@ -998,11 +1000,11 @@ typedef volatile struct
typedef volatile struct { - int hooks_count[WH_MAX - WH_MIN + 2]; /* active hooks count */ unsigned int wake_mask; /* wakeup mask */ unsigned int wake_bits; /* wakeup bits */ unsigned int changed_mask; /* changed wakeup mask */ unsigned int changed_bits; /* changed wakeup bits */ + int hooks_count[NB_HOOKS]; /* active hooks count */ } queue_shm_t;
typedef volatile struct