Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!ittatc!dcdwest!sdcsvax!ucbvax!info-vax From: info-vax@ucbvax.UUCP Newsgroups: mod.computers.vax Subject: Re: Dereferencing NULL pointer in C Message-ID: <8602030356.AA03669@epsilon.UUCP> Date: Sun, 2-Feb-86 22:56:37 EST Article-I.D.: epsilon.8602030356.AA03669 Posted: Sun Feb 2 22:56:37 1986 Date-Received: Tue, 4-Feb-86 07:25:10 EST References: <8602020523.AA28338@ucbvax.berkeley.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 16 Approved: info-vax@sri-kl.arpa You are not alone..... The Pr1ime C compiler is in danger of the same thing due to the difference between a"NULL" and the defined NULL. In most of the C world NULL is some concept con- cerning "0"... this is not the real case. What we want for "NULL" is really a C cast called "(char *) 0" which really means a pointer valuse to 0. I have already been trapped by a lot of custom code whre "NULL" has been defined as everyting from "0" to "(long *) 0". I suggest you check out hoe NULL has been defined on your machine and hoe it is expected to be by the code you are porting. the everloving C language cast is USEFUL!! ...iamanint = (int) iamapointer....