[vlc-devel] commit: Cosmetics (Fixed mix up between 0 and NULL). (Laurent Aimar )
rdenis at simphalempin.com
Wed Aug 27 16:48:54 CEST 2008
On Wed, 27 Aug 2008 13:45:08 +0200 (CEST), git at videolan.org (git version
> vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Aug 27
> 13:24:02 2008 +0200| [dc977392562adad0f1df7ad1c838b26bd9a8798f] |
> committer: Laurent Aimar
> Cosmetics (Fixed mix up between 0 and NULL).
I am all for using NULL rather than 0 for pointers.
Note however that in most cases, there is no problem with this, except for
ugliness. 64-bits crashes such as that observed by dionoea only occurs if
the compiler does not know it must convert to a pointer. It happened
because we had a variable arguments function, so the compiler was pushing a
32-bits (int)0, rather than 64-bits (void *)0 onto the call stack.
When assigning a variable, returning a value, or passing a typed parameter,
0 is OK (but ugly, of course).
More information about the vlc-devel