From 2292d339ce5e9a4a7408004a77fee23429428e7a Mon Sep 17 00:00:00 2001 From: Scoopta Date: Wed, 10 Nov 2021 22:00:50 -0800 Subject: [PATCH] Fixed the write error check printing under the wrong circumstances --- src/wofi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index bb08235..c96cb3e 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -1281,7 +1281,7 @@ static void do_copy(void) { } close(fds[0]); - if (write(fds[1], action, strlen(action)) != 0) { + if(write(fds[1], action, strlen(action)) <= 0) { fprintf(stderr, "fd pipe failed to write\n"); }