[X2Go-Commits] [nx-libs] 34/108: nxagentInitAndCheckVisuals: adapt bool usage to match the previous function

git-admin at x2go.org git-admin at x2go.org
Fri Nov 9 20:35:38 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository nx-libs.

commit 7b8aef83ab2ac6c0b059064951e03f0bb18b5e77
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Sep 24 21:36:50 2018 +0200

    nxagentInitAndCheckVisuals: adapt bool usage to match the previous function
    
    One question remains: why are we using "bool" instead of "Bool" here?
---
 nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 3ca3db2..448969d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -2492,12 +2492,10 @@ static int nxagentInitAndCheckVisuals(int flexibility)
 
   long viMask;
   int i, n;
-  int matched;
-  int compatible;
+  bool matched;
+  bool compatible = true;
   int viNumList;
 
-  compatible = 1;
-
   viMask = VisualScreenMask;
   viTemplate.screen = DefaultScreen(nxagentDisplay);
   viTemplate.depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
@@ -2507,7 +2505,7 @@ static int nxagentInitAndCheckVisuals(int flexibility)
 
   for (i = 0; i < nxagentNumVisuals; i++)
   {
-    matched = 0;
+    matched = false;
 
     for (n = 0; n < viNumList; n++)
     {
@@ -2528,7 +2526,7 @@ FIXME: Should the visual be ignored in this case?
           #endif
         }
 
-        matched = 1;
+        matched = true;
 
         nxagentVisualHasBeenIgnored[i] = FALSE;
 
@@ -2538,7 +2536,7 @@ FIXME: Should the visual be ignored in this case?
       }
     }
 
-    if (matched == 0)
+    if (!matched)
     {
       if (nxagentVisuals[i].class == DirectColor)
       {
@@ -2564,7 +2562,7 @@ FIXME: Should the visual be ignored in this case?
         fprintf(stderr, "\tbits_per_rgb = %d\n", nxagentVisuals[i].bits_per_rgb);
         #endif
 
-        compatible = 0;
+        compatible = false;
 
         break;
       }
@@ -2573,7 +2571,7 @@ FIXME: Should the visual be ignored in this case?
 
   XFree(viList);
 
-  if (compatible == 1)
+  if (compatible)
   {
     #ifdef TEST
     fprintf(stderr, "nxagentInitAndCheckVisuals: New visuals match with old visuals.\n");

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list