aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/regex.c')
-rw-r--r--src/regex/regex.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/regex/regex.c b/src/regex/regex.c
index 839b425bf..0a2671fa0 100644
--- a/src/regex/regex.c
+++ b/src/regex/regex.c
@@ -3703,18 +3703,20 @@ GNUNET_REGEX_combine (char * const regexes[])
3703 unsigned int i; 3703 unsigned int i;
3704 char *combined; 3704 char *combined;
3705 const char *current; 3705 const char *current;
3706 struct RegexCombineCtx *ctx; 3706 struct RegexCombineCtx ctx;
3707 3707
3708 ctx = GNUNET_malloc (sizeof (struct RegexCombineCtx)); 3708 memset (&ctx, 0, sizeof (struct RegexCombineCtx));
3709 for (i = 0; regexes[i]; i++) 3709 for (i = 0; regexes[i]; i++)
3710 { 3710 {
3711 current = regexes[i]; 3711 current = regexes[i];
3712 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Regex %u: %s\n", i, current); 3712 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Regex %u: %s\n", i, current);
3713 regex_add (ctx, current); 3713 regex_add (&ctx, current);
3714 } 3714 }
3715 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\nCombining...\n"); 3715 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\nCombining...\n");
3716 3716
3717 combined = regex_combine (ctx); 3717 combined = regex_combine (&ctx);
3718 3718
3719 return combined; 3719 return combined;
3720} 3720}
3721
3722/* end of regex.c */