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:
parent
d529265f02
commit
6b053637b3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user