projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eeb54c6
)
Add missing parentheses
author
Benjamin Kramer
<benny.kra@gmail.com>
Fri, 23 Jul 2010 20:20:18 +0000
(22:20 +0200)
committer
Benjamin Kramer
<benny.kra@gmail.com>
Mon, 26 Jul 2010 20:14:10 +0000
(22:14 +0200)
& has higher precedence than ==, making this a noop. Use the less
error-prone S_IS* macros instead. Found by clang.
src/node_stdio.cc
patch
|
blob
|
history
diff --git
a/src/node_stdio.cc
b/src/node_stdio.cc
index
c13ff50
..
5e09a84
100644
(file)
--- 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);
}