util: check for < 0 explicitly in safe_atou
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 12 Sep 2018 22:18:16 +0000 (08:18 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 12 Sep 2018 22:32:23 +0000 (08:32 +1000)
commitc501dabf396e6aeae41869cd2b57809f6d565378
tree857cda10e318298eea9211d39671008b78de4a7f
parentd616218c9ab60adea3f7a99e2fceaf21cde3b188
util: check for < 0 explicitly in safe_atou

The previous check only worked if sizeof(long) > sizeof(int). Rather than be
fancy about it, just cast to a signed long, check for negativity and continue
based on that.

Fixes #137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/libinput-util.h