Skip to content

Commit

Permalink
node.cc: use nullptr instead of NULL
Browse files Browse the repository at this point in the history
PR-URL: #124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
piscisaureus committed Dec 9, 2014
1 parent a38b917 commit 9483bfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -2298,7 +2298,7 @@ static void LinkedBinding(const FunctionCallbackInfo<Value>& 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),
Expand All @@ -2309,12 +2309,12 @@ static void LinkedBinding(const FunctionCallbackInfo<Value>& args) {

Local<Object> 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.");
Expand Down

0 comments on commit 9483bfe

Please sign in to comment.