From 3155b9bb225656eb1d3871b65110210a342e8c70 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Oct 2011 13:53:22 +1000 Subject: Use GetReqSized for GetReq and GetReqExtra GetEmptyReq and GetResReq cannot do this due to the final typecast - typically requests that need either of those do not have their own typedef in the protocol headers. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/Xlibint.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nx-X11/lib') diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index 5adde76ed..8d7291d01 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -461,10 +461,10 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len); #if !defined(UNIXCPP) || defined(ANSICPP) #define GetReq(name, req) \ - req = (x##name##Req *) _XGetRequest(dpy, X_##name, SIZEOF(x##name##Req)) + GetReqSized(name, SIZEOF(x##name##Req), req) #else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ #define GetReq(name, req) \ - req = (x/**/name/**/Req *) _XGetRequest(dpy, X_/**/name, SIZEOF(x/**/name/**/Req)) + GetReqSized(name, SIZEOF(x/**/name/**/Req), req) #endif /* GetReqExtra is the same as GetReq, but allocates "n" additional @@ -472,10 +472,10 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len); #if !defined(UNIXCPP) || defined(ANSICPP) #define GetReqExtra(name, n, req) \ - req = (x##name##Req *) _XGetRequest(dpy, X_##name, SIZEOF(x##name##Req) + n) + GetReqSized(name, SIZEOF(x##name##Req) + n, req) #else #define GetReqExtra(name, n, req) \ - req = (x/**/name/**/Req *) _XGetRequest(dpy, X_/**/name, SIZEOF(x/**/name/**/Req) + n) + GetReqSized(name, SIZEOF(x/**/name/**/Req) + n, req) #endif -- cgit v1.2.3