This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add missing parentheses

& has higher precedence than ==, making this a noop. Use the less
error-prone S_IS* macros instead. Found by clang.
  • Loading branch information...
1 parent eeb54c6 commit 93cb09642df30fc11e627a2ca6513e35a20f97a4 @d0k d0k committed Jul 23, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/node_stdio.cc
View
@@ -163,9 +163,7 @@ static bool IsBlocking(int fd) {
perror("fstat");
return true;
}
- if (s.st_mode & S_IFSOCK == S_IFSOCK) return false;
- if (s.st_mode & S_IFIFO == S_IFIFO) return false;
- return true;
+ return !S_ISSOCK(s.st_mode) && !S_ISFIFO(s.st_mode);
}

0 comments on commit 93cb096

Please sign in to comment.