test: fail before zero division

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-02-01 13:12:40 +10:00
parent 776c55f636
commit 65c4b27260

View file

@ -507,6 +507,7 @@ wheel_click_count(struct litest_device *dev, int which)
goto out;
count = parse_mouse_wheel_click_count_property(prop);
litest_assert_int_ne(count, 0);
angle = 360.0/count;
out: