delorie.com/archives/browse.cgi | search |
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: | <DKzMM1 DOT KrA AT jade DOT mv DOT net> |
NNTP-Posting-Host: | islay.ssl.berkeley.edu |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
In article <DKzMM1 DOT KrA AT jade DOT mv DOT net>, <kagel AT quasar DOT bloomberg DOT com> 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. <a href="http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpela/w"> Click here for more info.</a>
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |