Commit dfcb5d0b authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXresource.c: scope improvements

parent 026ddd8e
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment