From c08655271a240c0e4fb95b2c239a972f4f915a9c Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 14 Jul 2015 14:55:42 +0100 Subject: Consistently check the fd value Follow the approach used through the rest of the project. Suggested-by: Thierry Reding Signed-off-by: Emil Velikov Reviewed-by: Thierry Reding --- tests/name_from_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/name_from_fd.c b/tests/name_from_fd.c index 24af6e64..52646812 100644 --- a/tests/name_from_fd.c +++ b/tests/name_from_fd.c @@ -45,7 +45,7 @@ int main(int argc, char **argv) char *v; fd = open("/dev/dri/card0", O_RDWR); - if (fd == -1) + if (fd < 0) return 0; v = drmGetDeviceNameFromFd(fd); -- cgit v1.2.3