mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dix: rpcbuf: flag for auto-clear in error case
when the err_clear flag is set, the buffer memory will automatically be free()ed when allocation failed. This allows simplificatoin of caller's error pathes: the caller doesn't need to to call x_rpcbuf_clear() anymore and eg. can directly return out. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -32,6 +32,7 @@ typedef struct x_rpcbuf {
|
||||
char *buffer; /* pointer to whole buffer */
|
||||
Bool swapped; /* TRUE when typed write operation shall byte-swap */
|
||||
Bool error; /* TRUE when the last allocation failed */
|
||||
Bool err_clear; /* set to TRUE if should automatically clear on error */
|
||||
} x_rpcbuf_t;
|
||||
|
||||
#define XLIBRE_RPCBUF_CHUNK_SIZE 4096
|
||||
|
||||
Reference in New Issue
Block a user