aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-26 00:59:57 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:57:21 +0200
commitdfcb5d0b016f5d740aae5b1a877b91a0ab9bbc73 (patch)
treed0d0db90502111b434d4f2b5c339bd20dd16c5ef
parent026ddd8e1a3aee5587fb1b71fbb4ab26c9d366ff (diff)
downloadnx-libs-dfcb5d0b016f5d740aae5b1a877b91a0ab9bbc73.tar.gz
nx-libs-dfcb5d0b016f5d740aae5b1a877b91a0ab9bbc73.tar.bz2
nx-libs-dfcb5d0b016f5d740aae5b1a877b91a0ab9bbc73.zip
NXresource.c: scope improvements
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXresource.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c
index ca2175752..30be3e781 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c
@@ -142,16 +142,11 @@ static int nxagentResChangedFlag = 0;
#ifdef NXAGENT_SERVER
int nxagentFindClientResource(int client, RESTYPE type, void * value)
{
- ResourcePtr pResource;
- ResourcePtr *resources;
-
- int i;
-
- for (i = 0; i < clientTable[client].buckets; i++)
+ for (int i = 0; i < clientTable[client].buckets; i++)
{
- resources = clientTable[client].resources;
+ ResourcePtr *resources = clientTable[client].resources;
- for (pResource = resources[i]; pResource; pResource = pResource -> next)
+ for (ResourcePtr pResource = resources[i]; pResource; pResource = pResource -> next)
{
if (pResource -> type == type && pResource -> value == value)
{
@@ -171,13 +166,8 @@ int nxagentFindClientResource(int client, RESTYPE type, void * value)
int nxagentSwitchResourceType(int client, RESTYPE type, void * value)
{
- ResourcePtr pResource;
- ResourcePtr *resources;
-
RESTYPE internalType = 0;
- int i;
-
if (type == RT_PIXMAP)
{
internalType = RT_NX_PIXMAP;
@@ -205,11 +195,11 @@ int nxagentSwitchResourceType(int client, RESTYPE type, void * value)
return 0;
}
- for (i = 0; i < clientTable[serverClient -> index].buckets; i++)
+ for (int i = 0; i < clientTable[serverClient -> index].buckets; i++)
{
- resources = clientTable[serverClient -> index].resources;
+ ResourcePtr *resources = clientTable[serverClient -> index].resources;
- for (pResource = resources[i]; pResource; pResource = pResource -> next)
+ for (ResourcePtr pResource = resources[i]; pResource; pResource = pResource -> next)
{
if (pResource -> type == internalType &&
pResource -> value == value)