summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/run-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/run-test.c b/test/run-test.c
index be9f1ce..99ba56c 100644
--- a/test/run-test.c
+++ b/test/run-test.c
@@ -191,9 +191,9 @@ run_test (const char *name, int expect_failure)
fpin1 = fdopen (pin1, "r");
fpin2 = fdopen (pin2, "r");
- while (fgets (buf1, BUFSIZ, fpin1) > 0)
+ while (fgets (buf1, BUFSIZ, fpin1))
{
- if (fgets (buf2, BUFSIZ, fpin2) <= 0 || strcmp (buf1, buf2) != 0)
+ if (!fgets (buf2, BUFSIZ, fpin2) || strcmp (buf1, buf2) != 0)
{
ret = 0;
break;