Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> --- include/X11/Xregion.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/X11/Xregion.h b/include/X11/Xregion.h index c25d70b..cf10f86 100644 --- a/include/X11/Xregion.h +++ b/include/X11/Xregion.h @@ -112,10 +112,11 @@ typedef struct _XRegion { */ #define MEMCHECK(reg, rect, firstrect){\ if ((reg)->numRects >= ((reg)->size - 1)){\ - (firstrect) = (BOX *) Xrealloc \ - ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\ - if ((firstrect) == 0)\ + BoxPtr tmpRect = Xrealloc ((firstrect), \ + (2 * (sizeof(BOX)) * ((reg)->size))); \ + if (tmpRect == NULL) \ return(0);\ + (firstrect) = tmpRect; \ (reg)->size *= 2;\ (rect) = &(firstrect)[(reg)->numRects];\ }\ -- 1.7.9.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel