From a296b437d943529ebe3363490a84f8d640bade7a Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 29 Oct 2020 23:07:59 +0100 Subject: Clipboard.c: replace loop by helper --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 8872291fd..4baec7273 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1606,19 +1606,7 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X) #endif /* determine the selection we are talking about here */ - int index = 0; - for (index = 0; index < nxagentMaxSelections; index++) - { - #ifdef DEBUG - fprintf (stderr, "%s: index [%d] selAtom [%ld] remselection [%ld] .\n", - __func__, index, remSelAtoms[index], e->selection); - #endif - if (remSelAtoms[index] == e->selection) - { - break; - } - } - + int index = nxagentFindLastSelectionOwnerIndex(e->selection); if (index == nxagentMaxSelections) { #ifdef DEBUG -- cgit v1.2.3