From b65dd4e3094247560cae56ad00377387064c0627 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 2 Dec 2019 23:30:42 +0100 Subject: NXshm.c: simplify Dispatch functions --- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index a38baac6a..c84e8e5a9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -448,26 +448,21 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) return result; } -/* A wrapper that handles the trap. This construct is used - to keep the derived code closer to the original -*/ static int ProcShmDispatch (register ClientPtr client) { - int result; - #ifdef TEST REQUEST(xReq); if (stuff->data <= X_ShmCreatePixmap) { - fprintf(stderr, "ProcShmDispatch: Request [%s] OPCODE [%d] for client [%d].\n", + fprintf(stderr, "%s: Request [%s] OPCODE [%d] for client [%d].\n", __func__, nxagentShmRequestLiteral[stuff->data], stuff->data, client->index); } #endif nxagentShmTrap = True; - result = xorg_ProcShmDispatch(client); + int result = xorg_ProcShmDispatch(client); nxagentShmTrap = False; @@ -477,20 +472,18 @@ ProcShmDispatch (register ClientPtr client) static int SProcShmDispatch (register ClientPtr client) { - int result; - #ifdef TEST REQUEST(xReq); if (stuff->data <= X_ShmCreatePixmap) { - fprintf(stderr, "SProcShmDispatch: Request [%s] OPCODE [%d] for client [%d].\n", + fprintf(stderr, "%s: Request [%s] OPCODE [%d] for client [%d].\n", __func__, nxagentShmRequestLiteral[stuff->data], stuff->data, client->index); } #endif nxagentShmTrap = True; - result = xorg_SProcShmDispatch(client); + int result = xorg_SProcShmDispatch(client); nxagentShmTrap = False; -- cgit v1.2.3