aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-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)