Xext: xf86bigfont: use REPLY_*() macros for preparing / sending replies

Use the new macros for preparing and sending replies to clients.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-07-08 16:11:26 +02:00
parent a2b5e96882
commit 6363f790cb

View File

@@ -280,13 +280,11 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
? XF86Bigfont_CAP_LocalShm : 0
#endif /* CONFIG_MITSHM */
};
if (client->swapped) {
swaps(&reply.majorVersion);
swaps(&reply.minorVersion);
swapl(&reply.uid);
swapl(&reply.gid);
swapl(&reply.signature);
}
REPLY_FIELD_CARD16(majorVersion);
REPLY_FIELD_CARD16(minorVersion);
REPLY_FIELD_CARD32(uid);
REPLY_FIELD_CARD32(gid);
REPLY_FIELD_CARD32(signature);
return X_SEND_REPLY_SIMPLE(client, reply);
}
@@ -551,19 +549,20 @@ ProcXF86BigfontQueryFont(ClientPtr client)
.shmid = shmid,
};
REPLY_FIELD_CARD16(minCharOrByte2);
REPLY_FIELD_CARD16(maxCharOrByte2);
REPLY_FIELD_CARD16(defaultChar);
REPLY_FIELD_CARD16(nFontProps);
REPLY_FIELD_CARD16(fontAscent);
REPLY_FIELD_CARD16(fontDescent);
REPLY_FIELD_CARD32(nCharInfos);
REPLY_FIELD_CARD32(nUniqCharInfos);
REPLY_FIELD_CARD32(shmid);
REPLY_FIELD_CARD32(shmsegoffset);
if (client->swapped) {
swapCharInfo(&reply.minBounds);
swapCharInfo(&reply.maxBounds);
swaps(&reply.minCharOrByte2);
swaps(&reply.maxCharOrByte2);
swaps(&reply.defaultChar);
swaps(&reply.nFontProps);
swaps(&reply.fontAscent);
swaps(&reply.fontDescent);
swapl(&reply.nCharInfos);
swapl(&reply.nUniqCharInfos);
swapl(&reply.shmid);
swapl(&reply.shmsegoffset);
}
int rc = Success;