From 898251b4614b34c6dbe76bd66c647c5b83b1de7d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 25 Aug 2025 11:24:53 +0200 Subject: [PATCH] xkb: ProcXkbGetKbdByName(): use return code of X_SEND_REPLY_WITH_RPCBUF() The macro will automatically return BadAlloc if the buffer is broken, otherwise Success. Thus, we don't need extra prior rpcbuf check. Signed-off-by: Enrico Weigelt, metux IT consult --- xkb/xkb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index b6ca3c40b5..ee58be230c 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5915,7 +5915,7 @@ ProcXkbGetKbdByName(ClientPtr client) x_rpcbuf_write_rpcbuf_pad(&rpcbuf, &childbuf); } - X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + status = X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); if (loaded) { XkbDescPtr old_xkb; @@ -5973,7 +5973,7 @@ ProcXkbGetKbdByName(ClientPtr client) XkbSetCauseXkbReq(&cause, X_kbGetKbdByName, client); XkbUpdateAllDeviceIndicators(NULL, &cause); - return Success; + return status; } /***====================================================================***/