diff --git a/tests/protocol/instruction_read.c b/tests/protocol/instruction_read.c index f10e0017..930b5b5e 100644 --- a/tests/protocol/instruction_read.c +++ b/tests/protocol/instruction_read.c @@ -55,7 +55,7 @@ void test_instruction_read() { } /* Child (pipe writer) */ - if (childpid != 0) { + if (childpid == 0) { close(rfd); CU_ASSERT_EQUAL( write(wfd, test_string, sizeof(test_string)), diff --git a/tests/protocol/instruction_write.c b/tests/protocol/instruction_write.c index 5a21b608..8e12dfc1 100644 --- a/tests/protocol/instruction_write.c +++ b/tests/protocol/instruction_write.c @@ -50,7 +50,7 @@ void test_instruction_write() { } /* Child (pipe writer) */ - if (childpid != 0) { + if (childpid == 0) { guac_socket* socket; diff --git a/tests/protocol/nest_write.c b/tests/protocol/nest_write.c index 5d4c231e..e1b885b2 100644 --- a/tests/protocol/nest_write.c +++ b/tests/protocol/nest_write.c @@ -50,7 +50,7 @@ void test_nest_write() { } /* Child (pipe writer) */ - if (childpid != 0) { + if (childpid == 0) { guac_socket* nested_socket; guac_socket* socket;