Recently saw someone commending another user on their use of sizeof var instead of sizeof(type). I always thought that was just a style choice. Is there any significant difference? As an example, the lines with f and ff were considered better than the lines with g and gg:
typedef struct _foo {} foo;
foo *f = malloc(count * sizeof f);
foo *g = malloc(sizeof(foo) * count);
foo **ff = malloc(count * sizeof *ff);
foo **gg = malloc(sizeof(foo*) * count);
In my opinion, the first set is just a matter of style. But in the second pair of lines, the extra second * can easily be confused for a multiplication.