A dreadful thing

Saturday, October 4th, 2008 10:32
[personal profile] kpreid
some type *foo;
size_t count = ...;

...

foo = malloc(count * sizeof * foo);

(no subject)

Date: 2008-10-05 02:20 (UTC)
From: [identity profile] mattsnaps.livejournal.com
If I saw that line of code in a project I worked on, I'd assume it was a bug and talk to the developer who wrote it. If that dev told me it was not a bug, I'd ask him to add parentheses. If he didn't want to to that, well, then I'd kick him right in the fucking nuts.