aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-25 19:38:14 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-06-19 01:12:02 +0200
commitcb508b2632f661e19b44f1375ddce3ffb415f4c5 (patch)
tree8e2221e23e48b4867d1a9b29547fb6b33a1624d5 /nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
parentbffdacc48a6bd49e4ac1b4ce5d2fcc8eecdb811c (diff)
downloadnx-libs-cb508b2632f661e19b44f1375ddce3ffb415f4c5.tar.gz
nx-libs-cb508b2632f661e19b44f1375ddce3ffb415f4c5.tar.bz2
nx-libs-cb508b2632f661e19b44f1375ddce3ffb415f4c5.zip
various scope improvements
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Pixmap.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 676a0aebb..653426ebb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -700,7 +700,6 @@ static void nxagentPixmapMatchID(void *p0, XID x1, void *p2)
PixmapPtr nxagentPixmapPtr(Pixmap pixmap)
{
- int i;
struct nxagentPixmapPair pair;
if (pixmap == None)
@@ -714,7 +713,7 @@ PixmapPtr nxagentPixmapPtr(Pixmap pixmap)
FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP,
nxagentPixmapMatchID, &pair);
- for (i = 0; (pair.pMap == NULL) && (i < MAXCLIENTS); i++)
+ for (int i = 0; (pair.pMap == NULL) && (i < MAXCLIENTS); i++)
{
if (clients[i])
{
@@ -790,8 +789,8 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
Bool nxagentDisconnectAllPixmaps(void)
{
- int r = 1;
int i;
+ int r = 1;
#ifdef TEST
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.\n");
@@ -958,8 +957,6 @@ Bool nxagentReconnectAllPixmaps(void *p0)
{
Bool result = 1;
- int i;
-
#ifdef TEST
fprintf(stderr, "nxagentReconnectAllPixmaps: Going to recreate all pixmaps.\n");
#endif
@@ -991,7 +988,7 @@ Bool nxagentReconnectAllPixmaps(void *p0)
#endif
- for (i = 0, result = 1; i < MAXCLIENTS; result = 1, i++)
+ for (int i = 0, result = 1; i < MAXCLIENTS; result = 1, i++)
{
if (clients[i] != NULL)
{
@@ -1138,10 +1135,9 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
if (!integrity)
{
- int i;
char *p, *q;
- for (i = 0, p = image -> data, q = data; i < length; i++)
+ for (int i = 0, p = image -> data, q = data; i < length; i++)
{
if (p[i] != q[i])
{
@@ -1187,7 +1183,6 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
Bool nxagentCheckAllPixmapIntegrity(void)
{
- int i;
Bool imageIsGood = True;
#ifdef TEST
@@ -1197,7 +1192,7 @@ Bool nxagentCheckAllPixmapIntegrity(void)
FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP,
nxagentCheckOnePixmapIntegrity, &imageIsGood);
- for (i = 0; (i < MAXCLIENTS) && (imageIsGood); i++)
+ for (int i = 0; (i < MAXCLIENTS) && (imageIsGood); i++)
{
if (clients[i])
{
@@ -1630,11 +1625,10 @@ void nxagentPrintResourcePredicate(void *value, XID id, XID type, void *cdata)
void nxagentPrintResources(void)
{
Bool result;
- int i;
nxagentPrintResourceTypes();
- for (i = 0; i < MAXCLIENTS; i++)
+ for (int i = 0; i < MAXCLIENTS; i++)
{
if (clients[i])
{