mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
os: io: FlushClient() consolidate error/abort code path
remove some redundancy in the error path Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
be7784fce2
commit
fdf43d4176
16
os/io.c
16
os/io.c
@@ -880,10 +880,7 @@ FlushClient(ClientPtr who, OsCommPtr oc)
|
||||
|
||||
if (!trans_conn) {
|
||||
/* uh, transport not connected ? can only kill the client :( */
|
||||
AbortClient(who);
|
||||
dixMarkClientException(who);
|
||||
oco->count = 0;
|
||||
return -1;
|
||||
goto abortClient;
|
||||
}
|
||||
|
||||
size_t written = 0;
|
||||
@@ -940,10 +937,7 @@ FlushClient(ClientPtr who, OsCommPtr oc)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
AbortClient(who);
|
||||
dixMarkClientException(who);
|
||||
oco->count = 0;
|
||||
return -1;
|
||||
goto abortClient;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -961,6 +955,12 @@ FlushClient(ClientPtr who, OsCommPtr oc)
|
||||
}
|
||||
oc->output = (ConnectionOutputPtr) NULL;
|
||||
return 0; /* return only the amount explicitly requested */
|
||||
|
||||
abortClient:
|
||||
AbortClient(who);
|
||||
dixMarkClientException(who);
|
||||
oco->count = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static ConnectionInputPtr
|
||||
|
||||
Reference in New Issue
Block a user