mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user