Skip to content

Commit

Permalink
edited for readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
jongmin-won committed Dec 23, 2024
1 parent c0a67ae commit c747dfd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/parser/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ pt_compile_trigger_stmt (PARSER_CONTEXT * parser, const char *trigger_stmt, DB_O
PT_NODE *err_node;
int with_evaluate;

assert (parser != NULL);
assert (parser != NULL || !*new_trigger_stmt);

if (!trigger_stmt)
return NULL;
Expand Down Expand Up @@ -1257,17 +1257,16 @@ pt_compile_trigger_stmt (PARSER_CONTEXT * parser, const char *trigger_stmt, DB_O

new_trigger_stmt_str =
change_trigger_action_query (parser, statement->info.scope.stmt->info.trigger_action.expression, with_evaluate);
if (new_trigger_stmt_str != NULL && *new_trigger_stmt)
if (new_trigger_stmt_str == NULL)
{
free_and_init (*new_trigger_stmt);
*new_trigger_stmt = strdup (new_trigger_stmt_str);
free_and_init (new_trigger_stmt_str);
}
else
{
return NULL;
}

free_and_init (*new_trigger_stmt);
*new_trigger_stmt = strdup (new_trigger_stmt_str);
free_and_init (new_trigger_stmt_str);

statement->info.scope.stmt->info.trigger_action.expression =
mq_translate (parser, statement->info.scope.stmt->info.trigger_action.expression);
/*
Expand Down

0 comments on commit c747dfd

Please sign in to comment.