test: simplify error handling in interactive-evdev
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 Jun 2020 06:06:10 +0000 (16:06 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 25 Jun 2020 00:32:08 +0000 (10:32 +1000)
commit2eb5d2c81db908ff691b0ac58f2361dce6f7c005
treed34da03c506517e9c1c5045909f008e0ea0c146f
parent6c629a10cf2899125a6cbd2c723ed7a3185fad6d
test: simplify error handling in interactive-evdev

Passing -errno around and having separate labels depending on failure types is
superfluous here. All the unref calls can handle NULL and nothing cares about
errno once we're out of the immediate scope. So let's simplify this and deal
with 0 and 1 only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/interactive-evdev.c
tools/tools-common.c [new file with mode: 0644]
tools/tools-common.h [new file with mode: 0644]