mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
Xext: vidmode: ProcVidModeSetGammaRamp() simplify payload write out
WriteToClient() already checks for zero-length buffer and does nothing in that case. So we can make the code a bit easier to read and also allow further simplification of reply submission by upcoming commits. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -1585,11 +1585,8 @@ ProcVidModeGetGammaRamp(ClientPtr client)
|
||||
SwapShorts((short *) ramp, length * 3);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), &rep);
|
||||
|
||||
if (stuff->size) {
|
||||
WriteToClient(client, ramplen, ramp);
|
||||
free(ramp);
|
||||
}
|
||||
WriteToClient(client, ramplen, ramp);
|
||||
free(ramp);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user