mirror of
https://github.com/X11Libre/xserver.git
synced 2026-01-26 14:03:17 +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:
parent
819547669b
commit
4609d2e5e8
@ -522,10 +522,10 @@ Dispatch(void)
|
||||
}
|
||||
|
||||
/* now, finally, deal with client requests */
|
||||
result = ReadRequestFromClient(client);
|
||||
if (result == 0)
|
||||
long read_result = ReadRequestFromClient(client);
|
||||
if (read_result == 0)
|
||||
break;
|
||||
else if (result == -1) {
|
||||
else if (read_result == -1) {
|
||||
CloseDownClient(client);
|
||||
break;
|
||||
}
|
||||
@ -547,7 +547,7 @@ Dispatch(void)
|
||||
client->index,
|
||||
client->requestBuffer);
|
||||
#endif
|
||||
if (result < 0 || result > (maxBigRequestSize << 2))
|
||||
if (read_result < 0 || read_result > (maxBigRequestSize << 2))
|
||||
result = BadLength;
|
||||
else {
|
||||
result = Success;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user