Path: 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: <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 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