Skip to content

Commit

Permalink
test: use NULL instead of 0 in common.h
Browse files Browse the repository at this point in the history
This commit updates the macros in test/addons-napi/common.h to use NULL
instead of 0. This is very minor, but I had to look twice while going
through the code and finding what the macro was doing and comparing
with the struct definition. Using NULL makes it a little clearer I
think.

PR-URL: #24104
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
danbev authored and BridgeAR committed Nov 13, 2018
1 parent 838fb55 commit 56cd911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/addons-napi/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
NAPI_CALL_BASE(env, the_call, NAPI_RETVAL_NOTHING)

#define DECLARE_NAPI_PROPERTY(name, func) \
{ (name), 0, (func), 0, 0, 0, napi_default, 0 }
{ (name), NULL, (func), NULL, NULL, NULL, napi_default, NULL }

#define DECLARE_NAPI_GETTER(name, func) \
{ (name), 0, 0, (func), 0, 0, napi_default, 0 }
{ (name), NULL, NULL, (func), NULL, NULL, napi_default, NULL }

0 comments on commit 56cd911

Please sign in to comment.