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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-25 16:46:54 +02:00
parent d7c11245b0
commit 1102a0b6ce

View File

@@ -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));