aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex.c
diff options
context:
space:
mode:
authorszengel <szengel@140774ce-b5e7-0310-ab8b-a85725594a96>2012-10-19 14:24:49 +0000
committerszengel <szengel@140774ce-b5e7-0310-ab8b-a85725594a96>2012-10-19 14:24:49 +0000
commita26e05782b96f4504604133231fb30d69c0a1611 (patch)
tree2f5fe315b83f69adc0766e5fa783d6ecdcb9ad97 /src/regex/regex.c
parentb1426bf7f280dbb4370c301dffd0e26badba0c33 (diff)
coverity
git-svn-id: https://gnunet.org/svn/gnunet@24428 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/regex/regex.c')
-rw-r--r--src/regex/regex.c8
1 files changed, 5 insertions, 3 deletions
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);
}