Re: Little code cleanup
On Sat, Mar 08, 2008 at 03:30:18PM +0100, Thomas Roessler wrote:
> On 2008-03-08 14:20:47 +0000, Paul Walker wrote:
>
> > Why wouldn't you?
>
> K&R, 2nd Ed, p. 102
>
> Pointers and integers are not interchangeable. Zero is the
> sole exception: the constant zero may be assigned to a
> pointer, and a pointer may be compared with the constant zero.
More particularly any compile time expression that evaluates to zero.
So 'if (ptr_var == 1 - 1)' is also valid.
David
--
David Laight: david@xxxxxxxxx