aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c17
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c1
2 files changed, 16 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 695d14618..bb0e7302a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -674,7 +674,14 @@ Bool nxagentDisconnectAllPixmaps(void)
#endif
- for (int i = 0, r = 1; i < MAXCLIENTS; r = 1, i++)
+ /*
+ * FIXME: This is a bit cumbersome:
+ * - as stated below nxagentDisconnectPixmap will not modify r, so the result will stay at 1
+ * - at the end of each iteration r will be set to 1 anyway.
+ * So at the end of the loop r will always be 1. So the whole function will always return 1...
+ */
+ r = 1;
+ for (int i = 0; i < MAXCLIENTS; r = 1, i++)
{
if (clients[i])
{
@@ -837,7 +844,13 @@ Bool nxagentReconnectAllPixmaps(void *p0)
#endif
- for (int i = 0, result = 1; i < MAXCLIENTS; result = 1, i++)
+ /*
+ * FIXME: This is a bit cumbersome: at the end of each iteration
+ * result will be reset to 1. Therefore at loop exit result will
+ * always be 1 meaning the whole function will always return 1...
+ */
+ result = 1;
+ for (int i = 0; i < MAXCLIENTS; result = 1, i++)
{
if (clients[i] != NULL)
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 86d3ba502..ff7033c6c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -519,6 +519,7 @@ Bool nxagentReconnectSession(void)
nxagentEmptyBSPixmapList();
+ /* FIXME: nxagentReconnectAllPixmaps will always return 1 */
if (nxagentReconnectAllPixmaps(reconnectLossyLevel[PIXMAP_STEP]) == 0)
{
failedStep = PIXMAP_STEP;