dix: write out X_ListInstalledColormaps reply directly

No need for using a complex callback machinery, if we just move the
little pieces of byte-swapping directly into the request handler.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-04-04 19:33:30 +02:00
parent 900957760e
commit a5074bb749

View File

@ -2619,13 +2619,11 @@ ProcListInstalledColormaps(ClientPtr client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.length); swapl(&rep.length);
swaps(&rep.nColormaps); swaps(&rep.nColormaps);
SwapLongs(cm, nummaps * sizeof(Colormap) / 4);
} }
WriteToClient(client, sizeof(rep), &rep); WriteToClient(client, sizeof(rep), &rep);
if (client->swapped) WriteToClient(client, nummaps * sizeof(Colormap), cm);
Swap32Write(client, nummaps * sizeof(Colormap), cm);
else
WriteToClient(client, nummaps * sizeof(Colormap), cm);
free(cm); free(cm);
return Success; return Success;
} }