Latest changes from upstream with commit message...

When the three possible return values are -1, 0, and 1, != 1 is the
same as <= 0. And the latter is the normal idiom so use that.

ok claudio@ henning@