Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.unix-wizards Subject: Re: NULL vs 0 Message-ID: <4808@umcp-cs.UUCP> Date: Thu, 19-Jan-84 19:29:23 EST Article-I.D.: umcp-cs.4808 Posted: Thu Jan 19 19:29:23 1984 Date-Received: Sat, 21-Jan-84 01:49:03 EST References: <345@hocda.UUCP> <2406@rabbit.UUCP> Organization: Univ. of Maryland, Computer Science Dept. Lines: 29 I have one little minor thing to say here. I don't know about those 68k systems that have sizeof (int) == 2, sizeof (char *) == 4, but all the stdio.h files I've seen say #define NULL 0 (NOT #define NULL ((char *) 0)), so it won't make a bit of difference if you write f () { g (NULL, 1, 2); } instead of f () { g (0, 1, 2); } What you must do instead is write f () { g ((char *) NULL, 1, 2); } /* or (char *) 0 */ (assuming g expects it's first argument to be of type "char *"). I agree that it's good practise to include type casts for function parameters; however, as a "midnight hacker" I know how easy it is to miss these. (But I *do* use lint!) (Ever run lint on a 4.1BSD kernel after installing CMU IPC?) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris.umcp-cs@CSNet-Relay