test: return the right value from open_restricted

fd or negative errno on failure.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2015-05-06 11:55:48 +10:00
parent 3844856302
commit 1ea69203ac

View file

@ -393,7 +393,8 @@ litest_log_handler(struct libinput *libinput,
static int
open_restricted(const char *path, int flags, void *userdata)
{
return open(path, flags);
int fd = open(path, flags);
return fd < 0 ? -errno : fd;
}
static void