From a183cc72f0913c666c80629c34c1635d8fae2644 Mon Sep 17 00:00:00 2001 From: Tucker Polomik Date: Tue, 24 Aug 2021 11:16:25 -0400 Subject: [PATCH] Fix: errno assignment should be comparison. --- examples/other/cat_nonblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/other/cat_nonblock.c b/examples/other/cat_nonblock.c index 50f3b67..b04e239 100644 --- a/examples/other/cat_nonblock.c +++ b/examples/other/cat_nonblock.c @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) /* If there's an error, report it and die */ if (bytes == -1) { - if (errno = EAGAIN) + if (errno == EAGAIN) puts("Normally I'd block, but you told me not to"); else puts("Another read error"); -- 2.39.5