Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.std.c Subject: Re: [m]allocation question Message-ID: <11666:Sep2603:44:3190@kramden.acf.nyu.edu> Date: 26 Sep 90 03:44:31 GMT References: Organization: IR Lines: 8 In article ghoti+@andrew.cmu.edu (Adam Stoller) writes: > t = (struct node *) malloc(sizeof *t); The argument of sizeof isn't evaluated. Only its type matters. This is correct code, and perhaps easier to understand than the other obvious version. ---Dan