News for hackers. Stuff that matters.
Re:My Code made it to a Hollywood Movie by Dylan16807 on Sunday December 08, 2013 @07:05PM (#6872149)
...you make the intent clear?
Re:My Code made it to a Hollywood Movie by asveikau on Sunday December 08, 2013 @07:15PM (#6872193)
I get the impression from some of these responses that you folks would prefer:

    struct foo *bar = (struct foo*)malloc(sizeof(struct foo));
Over:

    struct foo *bar = malloc(sizeof(*bar));
I suppose the former is more clear by somebody's definition but I am going to continue to consider it somewhat ridiculous.
Re:My Code made it to a Hollywood Movie by mhogomchungu on Sunday December 08, 2013 @08:12PM (#6872364)
I do something like this:

    char * buffer = ( char * )malloc( sizeof( char ) * 32 ) ;
Why? because i like to look at my code written that way.

If i code for somebody else's preference,i do it their way,if i code for my own consumption,i code it the way it pleases me.