Well, in this (simple) case you can just do
int *foo;
foo = malloc(sizeof(*foo));
And avoid the brittleness mentioned. int *foo;
foo = malloc(sizeof(*foo));
And avoid the brittleness mentioned.No comments yet.