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 b6cd982477
commit ff6ee89494

View File

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