[m]allocation question

Karl Heuer karl at haddock.ima.isc.com
Sun Sep 30 03:38:30 AEST 1990


In article <18552 at rpp386.cactus.org> jfh at 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 at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.std.c mailing list