From 1102a0b6cebedf9e16c3ece4961dd07215d6ac66 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 25 Aug 2025 16:46:54 +0200 Subject: [PATCH] dix: let X_SEND_REPLY_SIMPLE() return X11 result code Let X_SEND_REPLY_SIMPLE() macro return the X11 result code `Success`. No change in semantics, just allowing a bit shorter typing, so one can now directly write `return X_SEND_REPLY_SIMPLE(...)` in one line. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/dix_priv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dix/dix_priv.h b/dix/dix_priv.h index 332cc470b..aeeb7b5ef 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -769,7 +769,7 @@ static inline int __write_reply_hdr_and_rpcbuf( return Success; } -static inline void __write_reply_hdr_simple( +static inline int __write_reply_hdr_simple( ClientPtr pClient, void *hdrData, size_t hdrLen) { xGenericReply *reply = hdrData; @@ -783,6 +783,7 @@ static inline void __write_reply_hdr_simple( } WriteToClient(pClient, hdrLen, hdrData); + return Success; } /* @@ -791,6 +792,7 @@ static inline void __write_reply_hdr_simple( * @param client pointer to the client (ClientPtr) * @param hdrstruct the header struct (not pointer, the struct itself!) * @param rpcbuf the rpcbuf to send (not pointer, the struct itself!) + * return X11 result code */ #define X_SEND_REPLY_WITH_RPCBUF(client, hdrstruct, rpcbuf) \ __write_reply_hdr_and_rpcbuf(client, &hdrstruct, sizeof(hdrstruct), &rpcbuf); @@ -800,6 +802,7 @@ static inline void __write_reply_hdr_simple( * * @param client pointer to the client (ClientPtr) * @param hdrstruct the header struct (not pointer, the struct itself!) + * @return X11 result code (=Success) */ #define X_SEND_REPLY_SIMPLE(client, hdrstruct) \ __write_reply_hdr_simple(client, &hdrstruct, sizeof(hdrstruct));