From 9739c7009513fc6e72265da40ca2e488152fbda2 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 10 Jun 2019 15:23:55 +0200 Subject: Clipboard.c: Scope improvements --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index f3c6cb1ad..3045698ed 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -392,8 +392,6 @@ Bool nxagentValidServerTargets(Atom target) void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) { - int i; - #ifdef DEBUG fprintf(stderr, "%s: Called with client [%p] window [%p].\n", __func__, (void *) pClient, (void *) pWindow); @@ -405,7 +403,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) * Only for PRIMARY and CLIPBOARD selections. */ - for (i = 0; i < nxagentMaxSelections; i++) + for (int i = 0; i < nxagentMaxSelections; i++) { if ((pClient != NULL && lastSelectionOwner[i].client == pClient) || (pWindow != NULL && lastSelectionOwner[i].windowPtr == pWindow)) @@ -1259,7 +1257,6 @@ void nxagentResetSelectionOwner(void) void nxagentSetSelectionOwner(Selection *pSelection) { - int i; #ifdef DEBUG fprintf(stderr, "%s: Got called.\n", __func__); #endif @@ -1286,7 +1283,7 @@ void nxagentSetSelectionOwner(Selection *pSelection) * Only for PRIMARY and CLIPBOARD selections. */ - for (i = 0; i < nxagentMaxSelections; i++) + for (int i = 0; i < nxagentMaxSelections; i++) { if (pSelection->selection == CurrentSelections[i].selection) { -- cgit v1.2.3