소스 검색

Fix: errno assignment should be comparison.

Tucker Polomik 3 년 전
부모
커밋
a183cc72f0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      examples/other/cat_nonblock.c

+ 1 - 1
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");