From 6e662473126d0668493732ece7e3c3bb1b0ea72c Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 13 Feb 2015 13:41:31 +0100 Subject: Several fixes for building debug versions of NX (990_fix-DEBUG-and-TEST-builds.full.patch). (1) In nx-X11/programs/Xserver/dix: Fix several compile errors when specifying -DDEBUG globally. Previous GCC versions were more liberal and the code thus compiled. Also initialize/reset a count variable correctly. (2) In nx-X11/programs/Xserver/hw/nxagent/Render.c: Check for pSrc->pDrawable to exist instead of having nxagent segfault when it does not. This enables the possibility of compiling all nxagent modules in TEST mode. --- nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c index f18c09fe4..3d9ee8c7f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c @@ -735,7 +735,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio client->sequence++; #ifdef DEBUG - if (client->requestLogIndex == MAX_REQUEST_LOG) + if ((client->requestLogIndex >= MAX_REQUEST_LOG) || (client->requestLogIndex <= 0)) client->requestLogIndex = 0; client->requestLog[client->requestLogIndex] = MAJOROP; client->requestLogIndex++; -- cgit v1.2.3