Commit 54dd29cc authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Client.c: cleanup Boolean handling for nxagentNeedWakeup*() macros

parent 2ce0fa8f
...@@ -457,7 +457,7 @@ void nxagentWaitWakeupBySplit(ClientPtr client) ...@@ -457,7 +457,7 @@ void nxagentWaitWakeupBySplit(ClientPtr client)
{ {
#ifdef TEST #ifdef TEST
if (nxagentNeedWakeupBySplit(client) == 0) if (!nxagentNeedWakeupBySplit(client))
{ {
fprintf(stderr, "++++++nxagentWaitWakeupBySplit: WARNING! The client [%d] is already awake.\n", fprintf(stderr, "++++++nxagentWaitWakeupBySplit: WARNING! The client [%d] is already awake.\n",
client -> index); client -> index);
...@@ -497,12 +497,12 @@ void nxagentWaitWakeupBySplit(ClientPtr client) ...@@ -497,12 +497,12 @@ void nxagentWaitWakeupBySplit(ClientPtr client)
#endif #endif
if (nxagentNeedWakeupBySplit(client) == 0 || if (!nxagentNeedWakeupBySplit(client) ||
NXDisplayError(nxagentDisplay) == 1) NXDisplayError(nxagentDisplay) == 1)
{ {
#ifdef TEST #ifdef TEST
if (nxagentNeedWakeupBySplit(client) == 0) if (!nxagentNeedWakeupBySplit(client))
{ {
fprintf(stderr, "++++++nxagentWaitWakeupBySplit: Client [%d] can now run.\n", fprintf(stderr, "++++++nxagentWaitWakeupBySplit: Client [%d] can now run.\n",
client -> index); client -> index);
...@@ -535,7 +535,7 @@ FIXME: Should record a serial number for the client, so that the ...@@ -535,7 +535,7 @@ FIXME: Should record a serial number for the client, so that the
*/ */
if (client -> index < MAX_CONNECTIONS) if (client -> index < MAX_CONNECTIONS)
{ {
if (nxagentNeedWakeup(client) == 0) if (!nxagentNeedWakeup(client))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "++++++nxagentSuspendBySplit: Suspending client [%d] with agent sequence [%ld].\n", fprintf(stderr, "++++++nxagentSuspendBySplit: Suspending client [%d] with agent sequence [%ld].\n",
...@@ -583,7 +583,7 @@ FIXME: Should record a serial number for the client, so that the ...@@ -583,7 +583,7 @@ FIXME: Should record a serial number for the client, so that the
{ {
nxagentClientPriv(client) -> clientState &= ~SleepingBySplit; nxagentClientPriv(client) -> clientState &= ~SleepingBySplit;
if (nxagentNeedWakeup(client) == 0) if (!nxagentNeedWakeup(client))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "++++++nxagentWakeupBySplit: Resuming client [%d] with agent sequence [%ld].\n", fprintf(stderr, "++++++nxagentWakeupBySplit: Resuming client [%d] with agent sequence [%ld].\n",
...@@ -629,7 +629,7 @@ void nxagentCheckRestartedClients(struct timeval **timeout) ...@@ -629,7 +629,7 @@ void nxagentCheckRestartedClients(struct timeval **timeout)
for (int i = 1; i < currentMaxClients; i++) for (int i = 1; i < currentMaxClients; i++)
{ {
if (clients[i] != NULL && clients[i] -> osPrivate != NULL && if (clients[i] != NULL && clients[i] -> osPrivate != NULL &&
nxagentNeedWakeup(clients[i]) == 0) !nxagentNeedWakeup(clients[i]))
{ {
int fd = ((OsCommPtr) clients[i] -> osPrivate) -> fd; int fd = ((OsCommPtr) clients[i] -> osPrivate) -> fd;
......
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