Commit 33fbc621 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Pixmap.c: drop unused return code for nxagentDisconnectAllPixmaps

parent 7977b9f8
...@@ -647,9 +647,9 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2) ...@@ -647,9 +647,9 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
} }
} }
Bool nxagentDisconnectAllPixmaps(void) void nxagentDisconnectAllPixmaps(void)
{ {
int r = 1; int r;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.\n"); fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.\n");
...@@ -661,6 +661,7 @@ Bool nxagentDisconnectAllPixmaps(void) ...@@ -661,6 +661,7 @@ Bool nxagentDisconnectAllPixmaps(void)
* too. * too.
*/ */
r = 1;
FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP, nxagentDisconnectPixmap, &r); FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP, nxagentDisconnectPixmap, &r);
#ifdef WARNING #ifdef WARNING
...@@ -674,14 +675,7 @@ Bool nxagentDisconnectAllPixmaps(void) ...@@ -674,14 +675,7 @@ Bool nxagentDisconnectAllPixmaps(void)
#endif #endif
/* for (int i = 0; i < MAXCLIENTS; i++)
* FIXME: This is a bit cumbersome:
* - as stated below nxagentDisconnectPixmap will not modify r, so the result will stay at 1
* - at the end of each iteration r will be set to 1 anyway.
* So at the end of the loop r will always be 1. So the whole function will always return 1...
*/
r = 1;
for (int i = 0; i < MAXCLIENTS; r = 1, i++)
{ {
if (clients[i]) if (clients[i])
{ {
...@@ -689,6 +683,7 @@ Bool nxagentDisconnectAllPixmaps(void) ...@@ -689,6 +683,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to disconnect pixmaps of client [%d].\n", i); fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to disconnect pixmaps of client [%d].\n", i);
#endif #endif
r = 1;
FindClientResourcesByType(clients[i], RT_PIXMAP, nxagentDisconnectPixmap, &r); FindClientResourcesByType(clients[i], RT_PIXMAP, nxagentDisconnectPixmap, &r);
#ifdef WARNING #ifdef WARNING
...@@ -708,7 +703,7 @@ Bool nxagentDisconnectAllPixmaps(void) ...@@ -708,7 +703,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf(stderr, "nxagentDisconnectAllPixmaps: Pixmaps disconnection completed.\n"); fprintf(stderr, "nxagentDisconnectAllPixmaps: Pixmaps disconnection completed.\n");
#endif #endif
return r; return;
} }
void nxagentReconnectPixmap(void *p0, XID x1, void *p2) void nxagentReconnectPixmap(void *p0, XID x1, void *p2)
......
...@@ -132,7 +132,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y, ...@@ -132,7 +132,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
void nxagentReconnectPixmap(void *p0, XID x1, void *p2); void nxagentReconnectPixmap(void *p0, XID x1, void *p2);
Bool nxagentReconnectAllPixmaps(void *p0); Bool nxagentReconnectAllPixmaps(void *p0);
void nxagentDisconnectPixmap(void *p0, XID x1, void* p2); void nxagentDisconnectPixmap(void *p0, XID x1, void* p2);
Bool nxagentDisconnectAllPixmaps(void); void nxagentDisconnectAllPixmaps(void);
int nxagentDestroyNewPixmapResourceType(void * p, XID id); int nxagentDestroyNewPixmapResourceType(void * p, XID id);
......
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