[VDPAU] [PATCH 1/1] test: remove assignment-as-truth-value warning

Rémi Denis-Courmont remi at remlab.net
Tue Oct 28 23:36:13 PDT 2014


From: Rémi Denis-Courmont <remid at nvidia.com>

Signed-off-by: Rémi Denis-Courmont <remid at nvidia.com>
---
 test/dlclose.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/dlclose.c b/test/dlclose.c
index e2295c9..0d09587 100644
--- a/test/dlclose.c
+++ b/test/dlclose.c
@@ -12,7 +12,6 @@
 static int countOpenFDs(void)
 {
     DIR *dir = opendir("/proc/self/fd");
-    struct dirent *ent;
     int count = 0;
 
     if (!dir) {
@@ -21,7 +20,7 @@ static int countOpenFDs(void)
         return 0;
     }
 
-    while (ent = readdir(dir)) {
+    while (readdir(dir) != NULL) {
         count++;
     }
 
-- 
1.9.1



More information about the VDPAU mailing list