diff --git a/src/node.cc b/src/node.cc index d760c7297..11c6a7de8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -506,7 +506,7 @@ static Handle SetGid(const Arguments& args) { Local given_gid = args[0]->ToInteger(); int gid = given_gid->Int32Value(); int result; - if ((result == setgid(gid)) != 0) { + if ((result = setgid(gid)) != 0) { return ThrowException(Exception::Error(String::New(strerror(errno)))); } return Undefined();