What idiot decided it was a good idea to specify -1 as a possible return value of a function returning an unsigned type?