Print Story thanks everyone who congratulated me with a new job
Diary
By i (Fri Dec 22, 2006 at 07:14:25 AM EST) (all tags)
now to our little C puzzle.

ok, here's a function.


int safe_division (int a, int b)
{
  retun b ? (a / b) : 0;
}

is this code safe? is it? is it? i'm asking you!

well, cow could it be unsafe?



it is unsafe. it can and does crash on common architectures, such as IA32. honest. try to figure out that rare combination of inputs.

Full discussion: http://www.hulver.com/scoop/story/2006/12/22/71425/154