Tom Says: Safe code is boring code! Why??
Previous page:
Daily Crap 2010-05-27
Next page:
In Tom's Rainbows
I don't check the comment moderation queue very often. I prefer readers e-mail me, but created the comment form for the people who don't care to use e-mail, for whatever reason. My preference for e-mail was validated by an anonymous comment made two weeks ago that I fear may have a valid criticism of the code in my Scale-finder project, but describes it so vaguely I have no idea what the problem could be.
Name: IEEE Std 1003.1, 2003 Edition
Comment: return -1; // error <--- NOOOOOOOOOOOOOOO
UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED UNSIGNED
The function's signature promises a signed return value. Is this a recommendation to change that? Is this some kind of admonishment for not actually checking for that ("shouldn't-happen") error value in the caller? Should I go read that IEEE spec? Hrm.
Posted Jun 05, 2010, in the afternoon.