Fix: errno assignment should be comparison.

This commit is contained in:
Tucker Polomik 2021-08-24 11:16:25 -04:00
parent ecfe9606de
commit a183cc72f0

View File

@ -39,7 +39,7 @@ int main(int argc, char *argv[])
/* If there's an error, report it and die */ /* If there's an error, report it and die */
if (bytes == -1) { if (bytes == -1) {
if (errno = EAGAIN) if (errno == EAGAIN)
puts("Normally I'd block, but you told me not to"); puts("Normally I'd block, but you told me not to");
else else
puts("Another read error"); puts("Another read error");