3 ms·
Personally, I like the idiom T* t = malloc( sizeof *t ); It's no big deal, but it's just one less thing to change if you need to change the type. (I once h
by zbyszek 16y ago
Personally, I like the idiom
T* t = malloc( sizeof *t );
It's no big deal, but it's just one less thing to change if you need to change the type. (I once had to go through some code changing longs to ints to make it run on a 64-bit machine. Were the mallocs written this way it might have been a bit easier.)
And although I agree that his sizeof(char) rage is overblown, is the author's point about the zlib code not reasonable?