Merge pull request #75 from tuckerpo/fix/errno_assignment

Fix: errno assignment should be comparison.
This commit is contained in:
Jim Huang 2021-08-24 23:22:32 +08:00 committed by GitHub
commit c97348d2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");