aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-11-15 21:53:50 +0100
committerUlrich Sibiller <uli42@gmx.de>2019-11-15 21:59:56 +0100
commita41e23c062bc3401eb623d93c6589012244d7f6a (patch)
tree6ca7218b37611e5c7d04b67638285061946a92b9 /nx-X11/programs
parent2161fa2bd0f838be525d136a726aef088bc69292 (diff)
downloadnx-libs-a41e23c062bc3401eb623d93c6589012244d7f6a.tar.gz
nx-libs-a41e23c062bc3401eb623d93c6589012244d7f6a.tar.bz2
nx-libs-a41e23c062bc3401eb623d93c6589012244d7f6a.zip
Clipboard.c: automatically calc the array size
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 10d98fe88..b04ab88c2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -726,7 +726,7 @@ void nxagentRequestSelection(XEvent *X)
*/
long targets[] = {XA_STRING};
- int numTargets = 1;
+ int numTargets = sizeof(targets) / sizeof(targets[0]);
#ifdef DEBUG
fprintf(stderr, "%s: available targets:\n", __func__);
@@ -1702,7 +1702,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
{
/* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */
Atom targets[] = {XA_STRING, clientUTF8_STRING, clientTEXT, clientCOMPOUND_TEXT};
- int numTargets = 4;
+ int numTargets = sizeof(targets) / sizeof(targets[0]);
#ifdef DEBUG
fprintf(stderr, "%s: available targets:\n", __func__);