diff options
author | Benjamin Kramer <benny.kra@gmail.com> | 2010-07-23 22:20:18 +0200 |
---|---|---|
committer | Benjamin Kramer <benny.kra@gmail.com> | 2010-07-26 22:14:10 +0200 |
commit | 93cb09642df30fc11e627a2ca6513e35a20f97a4 (patch) | |
tree | dad51017b466112116b670125a15ca83996144ed /src/node_stdio.cc | |
parent | eeb54c63d85ed4a03cab2539aae5753d7d3aa68a (diff) | |
download | node-93cb09642df30fc11e627a2ca6513e35a20f97a4.tar.gz |
Add missing parentheses
& has higher precedence than ==, making this a noop. Use the less
error-prone S_IS* macros instead. Found by clang.
Diffstat (limited to 'src/node_stdio.cc')
-rw-r--r-- | src/node_stdio.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/node_stdio.cc b/src/node_stdio.cc index c13ff508d..5e09a8449 100644 --- a/src/node_stdio.cc +++ b/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); } |