Jasper Lievisse Adriaanse <[email protected]> wrote:

> CVSROOT:      /cvs
> Module name:  ports
> Changes by:   [email protected]  2010/01/03 14:49:06
> 
> Modified files:
>       x11/xfm        : Makefile 
>       x11/xfm/patches: patch-src_FmFw_c patch-src_FmMain_c 
>       x11/xfm/pkg    : PLIST 
> Added files:
>       x11/xfm/patches: patch-src_FmBitmaps_c patch-src_FmChmod_c 
>                        patch-src_FmHistory_c patch-src_FmLog_c 
>                        patch-src_FmSelection_c patch-src_TextField_c 
> 
> Log message:
> - fix seg. faults on amd64  due to many
> vararg libXt calls (XtVa...) being terminated with 0 instead of with NULL.

This is wrong.
If you pass a null pointer to a vararg function, you need an explicit
cast to a pointer context.  "NULL" is just a pretty name for "0", it
is not guaranteed to be null pointer constant.

Instead of replacing 0 with NULL, you need to replace it with (void *)0.
(Or (void *)NULL if you like, but that doesn't make any difference.)

http://www.c-faq.com/null/null2.html

-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to