diff --git a/src/node_os.cc b/src/node_os.cc index 1d6af2f9cab..9bff7e6b0bc 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -50,10 +50,7 @@ using namespace v8; static Handle GetEndianness(const Arguments& args) { HandleScope scope(node_isolate); - int i = 1; - bool big = (*(char *)&i) == 0; - Local endianness = String::New(big ? "BE" : "LE"); - return scope.Close(endianness); + return scope.Close(String::New(IsBigEndian() ? "BE" : "LE")); } static Handle GetHostname(const Arguments& args) {