Skip to content

Commit c97348d

Browse files
authored
Merge pull request #75 from tuckerpo/fix/errno_assignment
Fix: errno assignment should be comparison.
2 parents ecfe960 + a183cc7 commit c97348d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/other/cat_nonblock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
3939

4040
/* If there's an error, report it and die */
4141
if (bytes == -1) {
42-
if (errno = EAGAIN)
42+
if (errno == EAGAIN)
4343
puts("Normally I'd block, but you told me not to");
4444
else
4545
puts("Another read error");

0 commit comments

Comments
 (0)