[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Triggers status?



Ian Jackson writes ("Re: Triggers status?"):
> Raphael Hertzog writes ("Re: Triggers status?"):
> > * you replaced a bunch of "NULL" by "(char*)0". This reverts 
> >   http://git.debian.org/?p=dpkg/dpkg.git;a=commit;h=4e5846ccd3dcc33504aba8ef35a8962bccfd562e
...
> This isn't a matter of preference, I'm afraid.  I reverted this
> because the change was wrong.  NULL is incorrect in that context (a
> stdarg function expecting a char*), because it may be #define'd to 0.

I should be clearer about this.  I looked at that change at the time
and what it seemed to be was changing all instances of (char*)0 and
(void*)0 and (struct something*)0 and the like into NULL.

Unfortunately that is precisely wrong.  My coding style (which is
still mostly followed by most of the code) does not write (char*)0
where 0 would do - I like to write 0 for null pointers where
possible.  So in each case where I used (char*)0 I did so because NULL
would have been wrong (barring of course the odd mistake on my part).

Ian.



Reply to: