From a26e05782b96f4504604133231fb30d69c0a1611 Mon Sep 17 00:00:00 2001 From: szengel Date: Fri, 19 Oct 2012 14:24:49 +0000 Subject: coverity git-svn-id: https://gnunet.org/svn/gnunet@24428 140774ce-b5e7-0310-ab8b-a85725594a96 --- src/regex/regex.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/regex/regex.c') diff --git a/src/regex/regex.c b/src/regex/regex.c index 54d38e4c05..637eac00d7 100644 --- a/src/regex/regex.c +++ b/src/regex/regex.c @@ -1375,13 +1375,16 @@ static void dfa_remove_dead_states (struct GNUNET_REGEX_Automaton *a) { struct GNUNET_REGEX_State *s; + struct GNUNET_REGEX_State *s_next; struct GNUNET_REGEX_Transition *t; int dead; GNUNET_assert (DFA == a->type); - for (s = a->states_head; NULL != s; s = s->next) + for (s = a->states_head; NULL != s; s = s_next) { + s_next = s->next; + if (s->accepting) continue; @@ -2155,9 +2158,8 @@ nfa_add_question_op (struct GNUNET_REGEX_Context *ctx) new_nfa = nfa_fragment_create (start, end); nfa_add_states (new_nfa, a->states_head, a->states_tail); - automaton_fragment_clear (a); - GNUNET_CONTAINER_DLL_insert_tail (ctx->stack_head, ctx->stack_tail, new_nfa); + automaton_fragment_clear (a); } -- cgit v1.2.3-70-g09d2