mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Better check for FDs in net2 bindings
This commit is contained in:
1 parent
da16128bf6
commit
aec80d47bb
1 file changed
+3
-3
+3
-3
@@ -50,11 +50,11 @@ static Persistent<FunctionTemplate> recv_msg_template;
|
||||
|
||||
|
||||
#define FD_ARG(a) \
|
||||
if (!(a)->IsInt32()) { \
|
||||
int fd; \
|
||||
if (!(a)->IsInt32() || (fd = (a)->Int32Value()) < 0) { \
|
||||
return ThrowException(Exception::TypeError( \
|
||||
String::New("Bad file descriptor argument"))); \
|
||||
} \
|
||||
int fd = (a)->Int32Value();
|
||||
}
|
||||
|
||||
|
||||
static inline const char *errno_string(int errorno) {
|
||||
|
||||
Reference in new issue
Block a user