gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix signed/unsigned cmp


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix signed/unsigned cmp
Date: Fri, 05 Jan 2018 20:56:38 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 477e0dec4 fix signed/unsigned cmp
477e0dec4 is described below

commit 477e0dec4d6e9a51af2258611f45adea319ff6ae
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jan 5 20:56:35 2018 +0100

    fix signed/unsigned cmp
---
 src/regex/regex_test_lib.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index f4025f652..4e388a70b 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;
   }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]