aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex_test_lib.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-01-05 20:56:35 +0100
committerChristian Grothoff <christian@grothoff.org>2018-01-05 20:56:35 +0100
commit477e0dec4d6e9a51af2258611f45adea319ff6ae (patch)
tree0c340f3babaea2271a0d6c8065108a556555bd5f /src/regex/regex_test_lib.c
parentcde342c78885f070b3905cf84caa917fd7da2eb2 (diff)
fix signed/unsigned cmp
Diffstat (limited to 'src/regex/regex_test_lib.c')
-rw-r--r--src/regex/regex_test_lib.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index f4025f6529..4e388a70bd 100644
--- a/src/regex/regex_test_lib.c
+++ b/src/regex/regex_test_lib.c
@@ -164,14 +164,18 @@ new_regex_ctx (unsigned int alphabet_size)
return ctx;
}
+
static void
-move_children (struct RegexCombineCtx *dst, const struct RegexCombineCtx *src)
+move_children (struct RegexCombineCtx *dst,
+ const struct RegexCombineCtx *src)
{
size_t array_size;
array_size = sizeof(struct RegexCombineCtx *) * src->size;
- memcpy (dst->children, src->children, array_size);
- for (int i = 0; i < src->size; i++)
+ memcpy (dst->children,
+ src->children,
+ array_size);
+ for (unsigned int i = 0; i < src->size; i++)
{
src->children[i] = NULL;
}
@@ -402,6 +406,7 @@ regex_split (struct RegexCombineCtx *ctx,
tmp = ctx->children;
ctx->children = GNUNET_malloc (sizeof(*tmp) * ctx->size);
regex_add_multiple (ctx, suffix, tmp);
+ GNUNET_free (suffix);
GNUNET_free (tmp);
return;
}