From 0293e34b2e742466384bfbf4cb9aae7f62a7ecdc Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 23 Oct 2025 13:55:51 +0200 Subject: [PATCH] dix: inline SProcInternAtom() No need for having an extra function for just few lines. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/dispatch.c | 3 +++ dix/swapreq.c | 9 --------- dix/tables.c | 2 +- include/swapreq.h | 1 - 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 7765d6eb8f..95a5aa350b 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1104,6 +1104,9 @@ ProcInternAtom(ClientPtr client) char *tchar; REQUEST(xInternAtomReq); + REQUEST_AT_LEAST_SIZE(xInternAtomReq); + if (client->swapped) + swaps(&stuff->nbytes); REQUEST_FIXED_SIZE(xInternAtomReq, stuff->nbytes); if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse)) { diff --git a/dix/swapreq.c b/dix/swapreq.c index 646b68487b..262e231492 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -169,15 +169,6 @@ SProcConfigureWindow(ClientPtr client) } -int _X_COLD -SProcInternAtom(ClientPtr client) -{ - REQUEST(xInternAtomReq); - REQUEST_AT_LEAST_SIZE(xInternAtomReq); - swaps(&stuff->nbytes); - return ((*ProcVector[X_InternAtom]) (client)); -} - int _X_COLD SProcChangeProperty(ClientPtr client) { diff --git a/dix/tables.c b/dix/tables.c index 9b3b79c1ad..6f057c655d 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -347,7 +347,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { ProcCirculateWindow, ProcGetGeometry, ProcQueryTree, /* 15 */ - SProcInternAtom, + ProcInternAtom, ProcGetAtomName, SProcChangeProperty, SProcDeleteProperty, diff --git a/include/swapreq.h b/include/swapreq.h index 0bbedce852..c04a1b7ce3 100644 --- a/include/swapreq.h +++ b/include/swapreq.h @@ -61,7 +61,6 @@ int SProcGetImage(ClientPtr client); int SProcGetMotionEvents(ClientPtr client); int SProcGetProperty(ClientPtr client); int SProcImageText(ClientPtr client); -int SProcInternAtom(ClientPtr client); int SProcListFonts(ClientPtr client); int SProcListFontsWithInfo(ClientPtr client); int SProcLookupColor(ClientPtr client);