Skip to content

Commit e4425a8

Browse files
committed
Small refactor
1 parent 311f6c2 commit e4425a8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/napi/addon.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ static int cws_set_uint64_stat_list(napi_env env, napi_value exports, struct sta
191191

192192
while (list->name) {
193193
if (napi_create_bigint_uint64(env, (uint64_t)*((uint64_t *)(((size_t)stat)+list->offset)), &uint64)!=napi_ok)
194-
return 650;
194+
return 660;
195195

196196
if (napi_set_named_property(env, exports, list->name, uint64)!=napi_ok)
197-
return 651;
197+
return 661;
198198

199199
list++;
200200
}
@@ -1244,7 +1244,7 @@ napi_value c_create(napi_env env, napi_callback_info info)
12441244
if ((err=cws_add_function_util(env, res, CWS_JS_CREATE_FUNCTIONS, js_cws_instance))) {
12451245
js_cws_config_free(&js_cws_instance);
12461246

1247-
JS_CWS_THROW("cws_add_function_util", "Could add functions @ c_create constructor", 102)
1247+
JS_CWS_THROW("cws_add_function_util", "Could add functions @ c_create constructor", err)
12481248
}
12491249

12501250
if (napi_add_finalizer(env, res, (void *)js_cws_instance, cws_js_finalize, NULL, NULL)!=napi_ok) {

0 commit comments

Comments
 (0)