dix: Dispatch() separate variable for read result

Mixing result variables for separate things is making the code hard
to understand, so add a new local variable for temporarily storing
the result of ReadRequestFromClient().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-06-17 18:48:49 +02:00
parent 28bbfcd0b7
commit 183267b8bc

View File

@@ -519,10 +519,10 @@ Dispatch(void)
} }
/* now, finally, deal with client requests */ /* now, finally, deal with client requests */
result = ReadRequestFromClient(client); long read_result = ReadRequestFromClient(client);
if (result == 0) if (read_result == 0)
break; break;
else if (result == -1) { else if (read_result == -1) {
CloseDownClient(client); CloseDownClient(client);
break; break;
} }
@@ -544,7 +544,7 @@ Dispatch(void)
client->index, client->index,
client->requestBuffer); client->requestBuffer);
#endif #endif
if (result < 0 || result > (maxBigRequestSize << 2)) if (read_result < 0 || read_result > (maxBigRequestSize << 2))
result = BadLength; result = BadLength;
else { else {
result = XaceHookDispatch(client, client->majorOp); result = XaceHookDispatch(client, client->majorOp);