Article View: comp.std.c
Article #1759Re: [m]allocation question
From: Karl Heuer
Date: Sat, 29 Sep 1990 17:38
Date: Sat, 29 Sep 1990 17:38
15 lines
1127 bytes
1127 bytes
In article <18552@rpp386.cactus.org> jfh@rpp386.cactus.org (John F. Haugh II) writes: >looking at the code fragment, the type of "t" is unknown... there is no >declaration of "t" laying around... Oh? I think you overlooked this line from the original article: | static struct node *head, *z, *t; >I always try to "say what I mean" [and hence write] > t = (struct node *) malloc (sizeof (struct node)); I happen to agree, but comp.std.c is not the place for style wars. Both `sizeof(*t)' and `sizeof(struct node)' are correct C, and we should leave it at that. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint
Technical Details
Message-ID:
<18340@haddock.ima.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ism.isc.com!haddock!karlReferences:
<UaxqffS00Vtq8akksB@andrew.cmu.edu> <11666:Sep2603:44:3190@kramden.acf.nyu.edu> <18552@rpp386.cactus.org>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ism.isc.com!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: [m]allocation question Message-ID: <18340@haddock.ima.isc.com> Date: 29 Sep 90 17:38:30 GMT References: <UaxqffS00Vtq8akksB@andrew.cmu.edu> <11666:Sep2603:44:3190@kramden.acf.nyu.edu> <18552@rpp386.cactus.org> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 15