1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[ecmascript] Explicit comparison with NULL. Refs #303

This commit is contained in:
Witold Filipczyk 2024-05-10 14:44:16 +02:00
parent d529265f02
commit 6b053637b3
3 changed files with 3 additions and 3 deletions

View File

@ -2824,7 +2824,7 @@ mjs_element_matches(js_State *J)
}
void *res = el_match_selector(selector, el);
js_pushboolean(J, res);
js_pushboolean(J, res != NULL);
}
static void

View File

@ -2947,7 +2947,7 @@ js_element_matches(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst
void *res = el_match_selector(selector, el);
JS_FreeCString(ctx, selector);
return JS_NewBool(ctx, res);
return JS_NewBool(ctx, res != NULL);
}
static JSValue

View File

@ -4823,7 +4823,7 @@ element_matches(JSContext *ctx, unsigned int argc, JS::Value *vp)
void *res = el_match_selector(selector, el);
mem_free(selector);
args.rval().setBoolean(res);
args.rval().setBoolean(res != NULL);
return true;
}