From 48c72edf38c9fbe815ce14c28829bfe023e6bebd Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 17 Sep 2025 11:02:30 +0200 Subject: [PATCH] Xi: use return value of X_SEND_REPLY_SIMPLE() Signed-off-by: Enrico Weigelt, metux IT consult --- Xi/chgdctl.c | 2 +- Xi/getfocus.c | 4 ++-- Xi/getvers.c | 3 +-- Xi/grabdev.c | 3 +-- Xi/setbmap.c | 3 +-- Xi/setdval.c | 3 +-- Xi/setmmap.c | 3 +-- Xi/setmode.c | 3 +-- Xi/xigetclientpointer.c | 4 ++-- Xi/xigrabdev.c | 3 +-- Xi/xiqueryversion.c | 4 ++-- Xi/xisetdevfocus.c | 4 ++-- 12 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index d420d670d..f187b4af0 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -230,7 +230,7 @@ ProcXChangeDeviceControl(ClientPtr client) SendEventToAllWindows(dev, DevicePresenceNotifyMask, (xEvent *) &dpn, 1); - X_SEND_REPLY_SIMPLE(client, rep); + ret = X_SEND_REPLY_SIMPLE(client, rep); } return ret; diff --git a/Xi/getfocus.c b/Xi/getfocus.c index ff464d452..94348b932 100644 --- a/Xi/getfocus.c +++ b/Xi/getfocus.c @@ -105,6 +105,6 @@ ProcXGetDeviceFocus(ClientPtr client) swapl(&rep.focus); swapl(&rep.time); } - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/getvers.c b/Xi/getvers.c index d9cda4d34..96365e021 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -106,6 +106,5 @@ ProcXGetExtensionVersion(ClientPtr client) swaps(&rep.minor_version); } - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 135013259..60e4a5fec 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -135,8 +135,7 @@ ProcXGrabDevice(ClientPtr client) if (rc != Success) return rc; - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } /*********************************************************************** diff --git a/Xi/setbmap.c b/Xi/setbmap.c index eb9eb748d..727871d1c 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -99,6 +99,5 @@ ProcXSetDeviceButtonMapping(ClientPtr client) .status = (ret == Success ? MappingSuccess : MappingBusy), }; - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/setdval.c b/Xi/setdval.c index ffee6688f..215fa7835 100644 --- a/Xi/setdval.c +++ b/Xi/setdval.c @@ -109,6 +109,5 @@ ProcXSetDeviceValuators(ClientPtr client) if (rep.status != Success && rep.status != AlreadyGrabbed) return rep.status; - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/setmmap.c b/Xi/setmmap.c index 0fafe4233..45774bd85 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -99,6 +99,5 @@ ProcXSetDeviceModifierMapping(ClientPtr client) .success = ret, }; - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/setmode.c b/Xi/setmode.c index cf6032534..37de5d19a 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -111,6 +111,5 @@ ProcXSetDeviceMode(ClientPtr client) return rep.status; } - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c index 91a8f89f8..331ef759c 100644 --- a/Xi/xigetclientpointer.c +++ b/Xi/xigetclientpointer.c @@ -82,6 +82,6 @@ ProcXIGetClientPointer(ClientPtr client) if (client->swapped) { swaps(&rep.deviceid); } - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + + return X_SEND_REPLY_SIMPLE(client, rep); } diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c index 93158bc10..7d2733da1 100644 --- a/Xi/xigrabdev.c +++ b/Xi/xigrabdev.c @@ -127,8 +127,7 @@ ProcXIGrabDevice(ClientPtr client) .status = status }; - X_SEND_REPLY_SIMPLE(client, rep); - return ret; + return X_SEND_REPLY_SIMPLE(client, rep); } int _X_COLD diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c index 26568c154..be2e3113c 100644 --- a/Xi/xiqueryversion.c +++ b/Xi/xiqueryversion.c @@ -122,8 +122,8 @@ ProcXIQueryVersion(ClientPtr client) swaps(&rep.major_version); swaps(&rep.minor_version); } - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + + return X_SEND_REPLY_SIMPLE(client, rep); } /* Swapping routines */ diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c index a14e6e8b1..0c079328d 100644 --- a/Xi/xisetdevfocus.c +++ b/Xi/xisetdevfocus.c @@ -114,6 +114,6 @@ ProcXIGetFocus(ClientPtr client) if (client->swapped) { swapl(&rep.focus); } - X_SEND_REPLY_SIMPLE(client, rep); - return Success; + + return X_SEND_REPLY_SIMPLE(client, rep); }