diff options
author | szengel <szengel@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-07-05 09:46:28 +0000 |
---|---|---|
committer | szengel <szengel@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-07-05 09:46:28 +0000 |
commit | e8af5351f87e4c8cad71fbed132d9f6437909fa7 (patch) | |
tree | caa90bfcf67eaefe1933f8c7afe6a27c38aa4d37 /src/regex/regex.c | |
parent | fb4524f2bbcf37899ab78a4997fa568c9cb5b53f (diff) |
regex: fixed static analyzer warnings
git-svn-id: https://gnunet.org/svn/gnunet@22492 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/regex/regex.c')
-rw-r--r-- | src/regex/regex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/regex/regex.c b/src/regex/regex.c index 1290569ccd..82949934df 100644 --- a/src/regex/regex.c +++ b/src/regex/regex.c @@ -1816,8 +1816,10 @@ nfa_add_concatenation (struct GNUNET_REGEX_Context *ctx) struct GNUNET_REGEX_Automaton *new; b = ctx->stack_tail; + GNUNET_assert (NULL != b); GNUNET_CONTAINER_DLL_remove (ctx->stack_head, ctx->stack_tail, b); a = ctx->stack_tail; + GNUNET_assert (NULL != a); GNUNET_CONTAINER_DLL_remove (ctx->stack_head, ctx->stack_tail, a); state_add_transition (ctx, a->end, 0, b->start); @@ -1953,8 +1955,10 @@ nfa_add_alternation (struct GNUNET_REGEX_Context *ctx) struct GNUNET_REGEX_State *end; b = ctx->stack_tail; + GNUNET_assert (NULL != b); GNUNET_CONTAINER_DLL_remove (ctx->stack_head, ctx->stack_tail, b); a = ctx->stack_tail; + GNUNET_assert (NULL != a); GNUNET_CONTAINER_DLL_remove (ctx->stack_head, ctx->stack_tail, a); start = nfa_state_create (ctx, 0); @@ -2391,7 +2395,6 @@ evaluate_nfa (struct GNUNET_REGEX_Automaton *a, const char *string) return 0; result = 1; - strp = string; sset = nfa_closure_create (a, a->start, 0); for (strp = string; NULL != strp && *strp; strp++) |