1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

Minor optimisation.

This commit is contained in:
Witold Filipczyk 2007-09-21 20:28:09 +02:00 committed by Witold Filipczyk
parent c06122a029
commit e7386bcd3c

View File

@ -327,7 +327,6 @@ ecmascript_set_action(unsigned char **action, unsigned char *string)
static void
ecmascript_timeout_handler(void *i)
{
struct string code;
struct timeout_data *td = i;
struct ecmascript_interpreter *interpreter = td->interpreter;
@ -335,10 +334,10 @@ ecmascript_timeout_handler(void *i)
"setTimeout: vs with no document (e_f %d)",
interpreter->vs->ecmascript_fragile);
del_from_list(td);
if (init_string(&code)) {
add_to_string(&code, td->code);
{
struct string code = INIT_STRING(td->code, strlen(td->code));
ecmascript_eval(interpreter, &code, NULL);
done_string(&code);
}
mem_free(td->code);
mem_free(td);