News for hackers. Stuff that matters.
Re:The Little C Function From Hell by mikeash on Tuesday June 19, 2012 @08:53PM (#4135077)
It works for == -1, but not for < 0, which is a common way to check for error returns from UNIX calls.

Any decent compiler should warn that such a check is always false, but people don't always pay attention to that stuff....

Re:The Little C Function From Hell by nitrogen on Wednesday June 20, 2012 @06:13AM (#4136342)
C is my absolute favorite language, and as such, I learned a long time ago to pay very close attention to compiler warnings and Valgrind memory errors.
Re:The Little C Function From Hell by mikeash on Wednesday June 20, 2012 @10:47AM (#4137215)
Sadly, a lot of people have never learned this valuable lesson, and happily build their code with hundreds or even thousands of warnings.
Re:The Little C Function From Hell by regularfry on Wednesday June 20, 2012 @06:12AM (#4136340)
Got it in one :-)