diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-09-22 15:51:49 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-09-22 15:52:39 -0700 |
commit | 28ad81420723175bfb163e20406af6d4d56bf4d4 (patch) | |
tree | a0edb2630311857fcb8ee3af02824e6e0be30a55 | |
parent | 68d0e5a122c6c76c19cc58ce9cea1424c7a5db11 (diff) |
Need to check for -1, not 0, to determine if shmat() failed
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/XvMC.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -526,7 +526,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port, if (shmKey >= 0) { shMem = (CARD32 *) shmat(shmKey, NULL, 0); shmctl(shmKey, IPC_RMID, NULL); - if ( shMem ) { + if (shMem != (void *) -1) { register volatile CARD32 *shMemC = shMem; register int i; |