diff options
author | LRN <lrn1986@gmail.com> | 2013-12-19 06:00:23 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-19 06:00:23 +0000 |
commit | e0ca7357cd0bfedc5c29cb731b56279fef8da059 (patch) | |
tree | ecfd47cf59bc00e656b53fd59c58f5038e342d65 /src/regex/regex_internal_dht.c | |
parent | 92fd84dc7ef98452f848a62677c61a2b80b5835e (diff) | |
download | gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.tar.gz gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.zip |
malloc -> new
Diffstat (limited to 'src/regex/regex_internal_dht.c')
-rw-r--r-- | src/regex/regex_internal_dht.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c index e87881902..f7d383406 100644 --- a/src/regex/regex_internal_dht.c +++ b/src/regex/regex_internal_dht.c | |||
@@ -187,7 +187,7 @@ REGEX_INTERNAL_announce (struct GNUNET_DHT_Handle *dht, | |||
187 | struct REGEX_INTERNAL_Announcement *h; | 187 | struct REGEX_INTERNAL_Announcement *h; |
188 | 188 | ||
189 | GNUNET_assert (NULL != dht); | 189 | GNUNET_assert (NULL != dht); |
190 | h = GNUNET_malloc (sizeof (struct REGEX_INTERNAL_Announcement)); | 190 | h = GNUNET_new (struct REGEX_INTERNAL_Announcement); |
191 | h->regex = regex; | 191 | h->regex = regex; |
192 | h->dht = dht; | 192 | h->dht = dht; |
193 | h->stats = stats; | 193 | h->stats = stats; |
@@ -614,7 +614,7 @@ regex_next_edge (const struct RegexBlock *block, | |||
614 | } | 614 | } |
615 | 615 | ||
616 | hash = &ctx->hash; | 616 | hash = &ctx->hash; |
617 | new_ctx = GNUNET_malloc (sizeof (struct RegexSearchContext)); | 617 | new_ctx = GNUNET_new (struct RegexSearchContext); |
618 | new_ctx->info = info; | 618 | new_ctx->info = info; |
619 | new_ctx->position = ctx->position + ctx->longest_match; | 619 | new_ctx->position = ctx->position + ctx->longest_match; |
620 | GNUNET_array_append (info->contexts, info->n_contexts, new_ctx); | 620 | GNUNET_array_append (info->contexts, info->n_contexts, new_ctx); |
@@ -693,7 +693,7 @@ REGEX_INTERNAL_search (struct GNUNET_DHT_Handle *dht, | |||
693 | LOG (GNUNET_ERROR_TYPE_INFO, "REGEX_INTERNAL_search: %s\n", string); | 693 | LOG (GNUNET_ERROR_TYPE_INFO, "REGEX_INTERNAL_search: %s\n", string); |
694 | GNUNET_assert (NULL != dht); | 694 | GNUNET_assert (NULL != dht); |
695 | GNUNET_assert (NULL != callback); | 695 | GNUNET_assert (NULL != callback); |
696 | h = GNUNET_malloc (sizeof (struct REGEX_INTERNAL_Search)); | 696 | h = GNUNET_new (struct REGEX_INTERNAL_Search); |
697 | h->dht = dht; | 697 | h->dht = dht; |
698 | h->description = GNUNET_strdup (string); | 698 | h->description = GNUNET_strdup (string); |
699 | h->callback = callback; | 699 | h->callback = callback; |
@@ -708,7 +708,7 @@ REGEX_INTERNAL_search (struct GNUNET_DHT_Handle *dht, | |||
708 | LOG (GNUNET_ERROR_TYPE_INFO, | 708 | LOG (GNUNET_ERROR_TYPE_INFO, |
709 | " initial key for %s: %s (%.*s)\n", | 709 | " initial key for %s: %s (%.*s)\n", |
710 | string, GNUNET_h2s (&key), size, string); | 710 | string, GNUNET_h2s (&key), size, string); |
711 | ctx = GNUNET_malloc (sizeof (struct RegexSearchContext)); | 711 | ctx = GNUNET_new (struct RegexSearchContext); |
712 | ctx->position = size; | 712 | ctx->position = size; |
713 | ctx->info = h; | 713 | ctx->info = h; |
714 | GNUNET_array_append (h->contexts, h->n_contexts, ctx); | 714 | GNUNET_array_append (h->contexts, h->n_contexts, ctx); |