From 00b9c8e79b4904139d7bb721b5ba175e591dfb34 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 13 Mar 2011 23:40:23 +0100 Subject: [PATCH] passfd test: Fix warnings. * tests/test-passfd.c: Include . (main): Fix typo. --- tests/test-passfd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test-passfd.c b/tests/test-passfd.c index ca46266d55..20489348b1 100644 --- a/tests/test-passfd.c +++ b/tests/test-passfd.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "macros.h" @@ -86,8 +87,7 @@ main () } ASSERT (ret == pid); - ret = WIFEXITED (status); - if (ret == 0) + if (!WIFEXITED (status)) { fprintf (stderr, "Child does not normally exit\n"); return 65; @@ -100,8 +100,8 @@ main () } /* try to stat new fd */ - ret == fstat (fd, &st); - if (0 != ret) + ret = fstat (fd, &st); + if (ret < 0) { perror ("fstat"); return 80; -- 2.30.2