1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

smjs_get_elinks_object: drop jsobj temp variable

After recent simplifications, the jsobj variable is no longer necessary.
Instead of assigning it a value and then returning it, just return the
value that was being assigned to it.
This commit is contained in:
Miciah Dashiel Butler Masters 2011-11-13 05:41:33 +00:00
parent 54c33284fc
commit 211c624aca

View File

@ -198,18 +198,13 @@ static const spidermonkeyFunctionSpec elinks_funcs[] = {
static JSObject * static JSObject *
smjs_get_elinks_object(void) smjs_get_elinks_object(void)
{ {
JSObject *jsobj;
assert(smjs_ctx); assert(smjs_ctx);
assert(smjs_global_object); assert(smjs_global_object);
jsobj = spidermonkey_InitClass(smjs_ctx, smjs_global_object, NULL, return spidermonkey_InitClass(smjs_ctx, smjs_global_object, NULL,
(JSClass *) &elinks_class, NULL, 0, (JSClass *) &elinks_class, NULL, 0,
(JSPropertySpec *) elinks_props, (JSPropertySpec *) elinks_props,
elinks_funcs, NULL, NULL); elinks_funcs, NULL, NULL);
if (!jsobj) return NULL;
return jsobj;
} }
void void