From 9483bfe6e3e84c3eee3056ac3a78d38cbb39d7b6 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 9 Dec 2014 05:57:17 +0100 Subject: [PATCH] node.cc: use nullptr instead of NULL PR-URL: https://github.com/iojs/io.js/pull/124 Reviewed-By: Ben Noordhuis --- src/node.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node.cc b/src/node.cc index 2cf6e1d..6e3d7ff 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2071,12 +2071,12 @@ struct node_module* get_builtin_module(const char* name) { struct node_module* get_linked_module(const char* name) { struct node_module* mp; - for (mp = modlist_linked; mp != NULL; mp = mp->nm_link) { + for (mp = modlist_linked; mp != nullptr; mp = mp->nm_link) { if (strcmp(mp->nm_modname, name) == 0) break; } - CHECK(mp == NULL || (mp->nm_flags & NM_F_LINKED) != 0); + CHECK(mp == nullptr || (mp->nm_flags & NM_F_LINKED) != 0); return mp; } @@ -2298,7 +2298,7 @@ static void LinkedBinding(const FunctionCallbackInfo& args) { node::Utf8Value module_v(module); node_module* mod = get_linked_module(*module_v); - if (mod == NULL) { + if (mod == nullptr) { char errmsg[1024]; snprintf(errmsg, sizeof(errmsg), @@ -2309,12 +2309,12 @@ static void LinkedBinding(const FunctionCallbackInfo& args) { Local exports = Object::New(env->isolate()); - if (mod->nm_context_register_func != NULL) { + if (mod->nm_context_register_func != nullptr) { mod->nm_context_register_func(exports, module, env->context(), mod->nm_priv); - } else if (mod->nm_register_func != NULL) { + } else if (mod->nm_register_func != nullptr) { mod->nm_register_func(exports, module, mod->nm_priv); } else { return env->ThrowError("Linked module has no declared entry point."); -- 2.7.4