dix: let x_rpcbuf_wsize_units() return CARD32

Practically all callers need to assign to a CARD32 field, so let it
directly compute and return as CARD32.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-08 14:14:29 +02:00
committed by Enrico Weigelt
parent d19cfbfa70
commit a1c3dcb527

View File

@@ -240,8 +240,8 @@ Bool x_rpcbuf_write_CARD32s(x_rpcbuf_t *rpcbuf, const CARD32 *values,
* @param rpcbuf pointer to x_rpcbuf_t to operate on
* @return number of 4-byte units (w/ padding) written into the buffer
*/
static inline size_t x_rpcbuf_wsize_units(x_rpcbuf_t *rpcbuf) {
return bytes_to_int32(pad_to_int32(rpcbuf->wpos));
static inline CARD32 x_rpcbuf_wsize_units(x_rpcbuf_t *rpcbuf) {
return (CARD32)((rpcbuf->wpos + 3) / 4);
}
#endif /* _XSERVER_DIX_RPCBUF_PRIV_H */