Browse Source

Add missing parentheses

& has higher precedence than ==, making this a noop. Use the less
error-prone S_IS* macros instead. Found by clang.
v0.7.4-release
Benjamin Kramer 15 years ago
parent
commit
93cb09642d
  1. 4
      src/node_stdio.cc

4
src/node_stdio.cc

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

Loading…
Cancel
Save