shoenig/YALL — Issue #10: want explicit type casting on every malloc call
Author: shoenig
Created: 2012-02-03 02:46:23+00:00
State: open
Labels: easy

Been using the style:
Something* s = malloc(sizeof(Something));
which led to a funny bug when I misused sizeof. Using the notation:
Something* s = (Something*) malloc(sizeof(Something));
would have caught the mistake, and is probably considered a best practice anyway.