summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-07-14 14:55:42 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-16 16:41:53 +0100
commitc08655271a240c0e4fb95b2c239a972f4f915a9c (patch)
tree1a975672b46fa5ebbfc73b99656261cd5cacb9b9 /tests
parentc1cd3d93881a9b4a27f7190393ccc7a0236d28a4 (diff)
Consistently check the fd value
Follow the approach used through the rest of the project. Suggested-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/name_from_fd.c2
1 files changed, 1 insertions, 1 deletions
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);