From decc44349ba66eb82c2ed575e60e80c2c827633d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Jul 2010 08:58:33 +1000 Subject: Correct XShm return values. XShmAttach, XShmDetach, XShmPutImage do not return a Status but 0 or 1. Though the man section for XShmAttach says "if all goes well, you will get a non-zero status, back" this is counter to the usage of Status in Xlib itself where 0 means Success and no-zero specifies the specific error. XShmPixmapFormat does not return a Status but the pixmap format or 0 on failure. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson --- src/XShm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/XShm.c b/src/XShm.c index 007fcd8..d1f1a4d 100644 --- a/src/XShm.c +++ b/src/XShm.c @@ -223,7 +223,7 @@ int XShmPixmapFormat(Display *dpy) } -Status XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) +Bool XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) { XExtDisplayInfo *info = find_display (dpy); register xShmAttachReq *req; @@ -243,7 +243,7 @@ Status XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) } -Status XShmDetach(Display *dpy, XShmSegmentInfo *shminfo) +Bool XShmDetach(Display *dpy, XShmSegmentInfo *shminfo) { XExtDisplayInfo *info = find_display (dpy); register xShmDetachReq *req; @@ -312,7 +312,7 @@ XImage *XShmCreateImage ( return image; } -Status XShmPutImage ( +Bool XShmPutImage ( register Display *dpy, Drawable d, GC gc, @@ -354,7 +354,7 @@ Status XShmPutImage ( } -Status XShmGetImage( +Bool XShmGetImage( register Display *dpy, Drawable d, XImage *image, -- cgit v1.2.1