[PATCH] __GLX_MEM_COPY(): no need to check for NULL pointers

Zdenek Kabelac zdenek.kabelac at gmail.com
Wed Feb 4 02:21:17 PST 2009

2009/2/4 Tomas Carnecky <tom at dbservice.com>:
> warning: the address of 'XXX' will always evaluate as 'true'
> This macro is exclusively used on pointers that are guaranteed
> to be valid. Either because the variable is on the stack, or
> the pointer is already being dereferenced earlier so by the time
> the macro is used, we can rely on it being valid.
> Signed-off-by: Tomas Carnecky <tom at dbservice.com>
> ---
> Thanks for the review.
> Btw, the code in dmx/glxProxy/ also doesn't have this check.
> grep -E '(__GLX_MEM_COPY|__GLX_GET_DOUBLE)' -r glx/ hw/dmx/glxProxy/

Actually - why there is a macro for doing just memcpy - wouldn't be
better to remove this macro then ?
At least everyone would immediately know what it is doing.


More information about the xorg mailing list