Xref: news-dnh.mv.net comp.os.msdos.djgpp:4270 Path: news-dnh.mv.net!mv!news.NH.Destek.Net!news2.net99.net!news.cais.net!primus.ac.net!news.internetMCI.com!newsfeed.internetmci.com!info.ucla.edu!agate!islay.ssl.berkeley.edu!korpela From: korpela AT islay DOT ssl DOT berkeley DOT edu (Eric J. Korpela) Newsgroups: comp.os.msdos.djgpp Subject: Re: (none) Date: 11 Jan 1996 18:23:27 GMT Organization: Cal Berkeley-- Space Sciences Lab Lines: 19 Message-ID: <4d3kiv$qv7@agate.berkeley.edu> References: NNTP-Posting-Host: islay.ssl.berkeley.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article , wrote: > > if (!my_pointer) > my_pointer = (my_struct_t *)malloc( sizeof (my_struct_t) ); > >Or BETTER CODE but equivalent: > > if (my_pointer == (my_struct_t *)NULL) Is this really better? Could option 1 fail? I thought the C standard guaranteed that the top option would work. Eric -- Eric Korpela | An object at rest can never be korpela AT ssl DOT berkeley DOT edu | stopped. Click here for more info.