Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hp-sdd!ncr-sd!serene!rfarris
From: rfarris@serene.CTS.COM (Rick Farris)
Newsgroups: comp.unix.microport
Subject: Re: running "pcomm" on Sys V/AT
Summary: What about us 286er's?
Keywords: de'reffing NULL pointers again
Message-ID: <218@serene.CTS.COM>
Date: 19 Sep 88 17:31:05 GMT
References: <633@wa3wbu.UUCP> <424@l5comp.UUCP> <635@wa3wbu.UUCP> <427@l5comp.UUCP>
Reply-To: rfarris@serene.cts.com (Rick Farris)
Organization: Serenity BBS,  Del Mar, Ca.
Lines: 19

In article <427@l5comp.UUCP> scotty@l5comp.UUCP (Scott Turner) writes:
>/*	if (*lock_path != NULL && lock_path != NULL) { */
>	if ((lock_path != NULL) && (*lock_path != NULL)) {
>
>Scott Turner

Wait a second.  Isn't there another problem here?  Doesn't this assume that
the size of a pointer, and the size of a char are the same?  Shouldn't this
really be:

	if ((lock_path != NULL) && (*lock_path != (char)NULL)) {

My compiler complains...
                      _______________________________
Rick Farris          |     rfarris@serene.cts.com    |   Voice  (619) 259-6793
POB M                |    ...!uunet!serene!rfarris   |   BBS          259-7757
Del Mar, CA 92014    |_______________________________|   serene.UUCP  259-3704

If carpenters built buildings the way most programmers write programs,
         the first woodpecker that came along would destroy civilization. . .