Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!gwyn@brl-vld From: gwyn%brl-vld@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: Please use NULL instead of 0 whenever you have a pointer! Message-ID: <15527@sri-arpa.UUCP> Date: Mon, 16-Jan-84 03:46:02 EST Article-I.D.: sri-arpa.15527 Posted: Mon Jan 16 03:46:02 1984 Date-Received: Wed, 18-Jan-84 07:33:15 EST Lines: 15 From: Doug Gwyn (VLD/VMB) However, zero pointers come in several different sizes in some implementations of C, with (char *) guaranteed to be the widest. This means that passing an actual argument of 0 to a function expecting a pointer may not necessarily work, unless the zero is explicitly type-cast to the corresponding pointer type. E.g., func( (struct foo *)0, more_args ); or func( (struct foo *)NULL, more_args ); rather than func( 0, more_args ); or func( NULL, more_args ); if the first formal parameter of foo() is declared a (struct foo *).