diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-07-18 09:07:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-07-18 09:07:36 +0000 |
commit | 3f5dc2ddcfc59ca54f18a3688fa1f8aa89340ce6 (patch) | |
tree | 1dbd1b650320680b0dfae141343d297e6cf0ad2b /src/fs/gnunet-service-fs_pe.c | |
parent | 0512be85aab449f2e0fb96e7aca1afa7757c7bd5 (diff) | |
download | gnunet-3f5dc2ddcfc59ca54f18a3688fa1f8aa89340ce6.tar.gz gnunet-3f5dc2ddcfc59ca54f18a3688fa1f8aa89340ce6.zip |
-minor code cleanup
Diffstat (limited to 'src/fs/gnunet-service-fs_pe.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index 0992d2163..5c63e7b66 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c | |||
@@ -539,7 +539,7 @@ merge_pr (void *cls, const struct GNUNET_HashCode * query, void *element) | |||
539 | GSF_pending_request_is_compatible_ (mpr->pr, rp->pe_head->pr)) | 539 | GSF_pending_request_is_compatible_ (mpr->pr, rp->pe_head->pr)) |
540 | return GNUNET_YES; | 540 | return GNUNET_YES; |
541 | /* merge new request with existing request plan */ | 541 | /* merge new request with existing request plan */ |
542 | bi = GNUNET_malloc (sizeof (struct GSF_PendingRequestPlanBijection)); | 542 | bi = GNUNET_new (struct GSF_PendingRequestPlanBijection); |
543 | bi->rp = rp; | 543 | bi->rp = rp; |
544 | bi->pr = mpr->pr; | 544 | bi->pr = mpr->pr; |
545 | prd = GSF_pending_request_get_data_ (mpr->pr); | 545 | prd = GSF_pending_request_get_data_ (mpr->pr); |
@@ -585,7 +585,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr) | |||
585 | pp = GNUNET_CONTAINER_multihashmap_get (plans, &id->hashPubKey); | 585 | pp = GNUNET_CONTAINER_multihashmap_get (plans, &id->hashPubKey); |
586 | if (NULL == pp) | 586 | if (NULL == pp) |
587 | { | 587 | { |
588 | pp = GNUNET_malloc (sizeof (struct PeerPlan)); | 588 | pp = GNUNET_new (struct PeerPlan); |
589 | pp->plan_map = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); | 589 | pp->plan_map = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); |
590 | pp->priority_heap = | 590 | pp->priority_heap = |
591 | GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MAX); | 591 | GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MAX); |
@@ -615,8 +615,8 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr) | |||
615 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 615 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
616 | "Planning transmission of query `%s' to peer `%s'\n", | 616 | "Planning transmission of query `%s' to peer `%s'\n", |
617 | GNUNET_h2s (&prd->query), GNUNET_i2s (id)); | 617 | GNUNET_h2s (&prd->query), GNUNET_i2s (id)); |
618 | rp = GNUNET_malloc (sizeof (struct GSF_RequestPlan)); // 8 MB | 618 | rp = GNUNET_new (struct GSF_RequestPlan); // 8 MB |
619 | bi = GNUNET_malloc (sizeof (struct GSF_PendingRequestPlanBijection)); | 619 | bi = GNUNET_new (struct GSF_PendingRequestPlanBijection); |
620 | bi->rp = rp; | 620 | bi->rp = rp; |
621 | bi->pr = pr; | 621 | bi->pr = pr; |
622 | GNUNET_CONTAINER_MDLL_insert (PR, prd->pr_head, prd->pr_tail, bi); | 622 | GNUNET_CONTAINER_MDLL_insert (PR, prd->pr_head, prd->pr_tail, bi); |