aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-13 19:55:46 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-13 19:55:46 +0200
commitfa2978883e1585b1eeff3a22b7a9b4f174a45ca3 (patch)
tree52800dd5062534729be80227608def6f6c0c45ac /src/regex
parent2bb2faa207e4015609100a1aca38af344c65596f (diff)
downloadgnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.tar.gz
gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.zip
get rid of plain memcpy calls
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/regex_test_lib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index 814380246..c5f9f6cf0 100644
--- a/src/regex/regex_test_lib.c
+++ b/src/regex/regex_test_lib.c
@@ -172,9 +172,9 @@ move_children (struct RegexCombineCtx *dst,
172 size_t array_size; 172 size_t array_size;
173 173
174 array_size = sizeof(struct RegexCombineCtx *) * src->size; 174 array_size = sizeof(struct RegexCombineCtx *) * src->size;
175 memcpy (dst->children, 175 GNUNET_memcpy (dst->children,
176 src->children, 176 src->children,
177 array_size); 177 array_size);
178 for (unsigned int i = 0; i < src->size; i++) 178 for (unsigned int i = 0; i < src->size; i++)
179 { 179 {
180 src->children[i] = NULL; 180 src->children[i] = NULL;
@@ -364,7 +364,9 @@ regex_add_multiple (struct RegexCombineCtx *ctx,
364 newctx = new_regex_ctx(ctx->size); 364 newctx = new_regex_ctx(ctx->size);
365 newctx->s = GNUNET_strdup (tmp); 365 newctx->s = GNUNET_strdup (tmp);
366 if (children != NULL) 366 if (children != NULL)
367 memcpy (newctx->children, children, sizeof (*children) * ctx->size); 367 GNUNET_memcpy (newctx->children,
368 children,
369 sizeof (*children) * ctx->size);
368 ctx->children[c2i(tmp[0], ctx->size)] = newctx; 370 ctx->children[c2i(tmp[0], ctx->size)] = newctx;
369 } 371 }
370 } 372 }