From 822cd47562c138002b45b24e6d4e25de3893088d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lo=C3=AFc=20Minier?= Date: Fri, 15 May 2009 16:11:16 +0200 Subject: [PATCH] Fix fd check after auxv file open() [Bug 21749] Signed-off-by: Julien Cristau --- pixman/pixman-pict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c index 548d38d..1b23045 100644 --- a/pixman/pixman-pict.c +++ b/pixman/pixman-pict.c @@ -2300,7 +2300,7 @@ pixman_arm_read_auxv() { Elf32_auxv_t aux; fd = open("/proc/self/auxv", O_RDONLY); - if (fd > 0) { + if (fd >= 0) { while (read(fd, &aux, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) { if (aux.a_type == AT_HWCAP) { uint32_t hwcap = aux.a_un.a_val; -- 2.7.4