diff options
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/regex_test_lib.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c index 88a76fa27c..7a11fe05ec 100644 --- a/src/regex/regex_test_lib.c +++ b/src/regex/regex_test_lib.c @@ -28,35 +28,13 @@ #include "platform.h" #include "gnunet_util_lib.h" - -/** - * Struct to hold the tree formed by prefix-combining the regexes. - */ struct RegexCombineCtx { - - /** - * Next node with same prefix but different token. - */ struct RegexCombineCtx *next; - - /** - * Prev node with same prefix but different token. - */ struct RegexCombineCtx *prev; - /** - * First child node with same prefix and token. - */ struct RegexCombineCtx *head; - - /** - * Last child node. - */ struct RegexCombineCtx *tail; - /** - * Token. - */ char *s; }; @@ -280,11 +258,10 @@ GNUNET_REGEX_read_from_file (const char *filename) else { len -= 6; - regex[len] = '\0'; + buffer[len] = '\0'; } regex = GNUNET_realloc (regex, len + 1); GNUNET_array_grow (regexes, nr, nr + 1); - GNUNET_assert (NULL == regexes[nr - 2]); regexes[nr - 2] = regex; regexes[nr - 1] = NULL; regex = NULL; |