diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-05 22:19:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-05 22:19:43 +0000 |
commit | 632a0bd9d3f244f26c242ee200b0b3a31a7f68df (patch) | |
tree | 2e5821c0eb5acca0231d78e1316a06a9d80032f0 /src/fs/fs_api.c | |
parent | 3c6b67f3282836765bc837fefbc600f7dbe23465 (diff) | |
download | gnunet-632a0bd9d3f244f26c242ee200b0b3a31a7f68df.tar.gz gnunet-632a0bd9d3f244f26c242ee200b0b3a31a7f68df.zip |
-stylistic fixes
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r-- | src/fs/fs_api.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 88d82158e..72d5eab15 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -313,7 +313,7 @@ GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h, GNUNET_FS_QueueStart start, | |||
313 | { | 313 | { |
314 | struct GNUNET_FS_QueueEntry *qe; | 314 | struct GNUNET_FS_QueueEntry *qe; |
315 | 315 | ||
316 | qe = GNUNET_malloc (sizeof (struct GNUNET_FS_QueueEntry)); | 316 | qe = GNUNET_new (struct GNUNET_FS_QueueEntry); |
317 | qe->h = h; | 317 | qe->h = h; |
318 | qe->start = start; | 318 | qe->start = start; |
319 | qe->stop = stop; | 319 | qe->stop = stop; |
@@ -2298,7 +2298,7 @@ deserialize_search (struct GNUNET_FS_Handle *h, | |||
2298 | * | 2298 | * |
2299 | * @param cls the 'struct GNUNET_FS_SearchContext*' | 2299 | * @param cls the 'struct GNUNET_FS_SearchContext*' |
2300 | * @param filename complete filename (absolute path) | 2300 | * @param filename complete filename (absolute path) |
2301 | * @return GNUNET_OK (continue to iterate) | 2301 | * @return #GNUNET_OK (continue to iterate) |
2302 | */ | 2302 | */ |
2303 | static int | 2303 | static int |
2304 | deserialize_search_result (void *cls, const char *filename) | 2304 | deserialize_search_result (void *cls, const char *filename) |
@@ -2332,7 +2332,7 @@ deserialize_search_result (void *cls, const char *filename) | |||
2332 | uris = NULL; | 2332 | uris = NULL; |
2333 | download = NULL; | 2333 | download = NULL; |
2334 | update_srch = NULL; | 2334 | update_srch = NULL; |
2335 | sr = GNUNET_malloc (sizeof (struct GNUNET_FS_SearchResult)); | 2335 | sr = GNUNET_new (struct GNUNET_FS_SearchResult); |
2336 | sr->h = sc->h; | 2336 | sr->h = sc->h; |
2337 | sr->sc = sc; | 2337 | sr->sc = sc; |
2338 | sr->serialization = ser; | 2338 | sr->serialization = ser; |
@@ -2398,7 +2398,8 @@ deserialize_search_result (void *cls, const char *filename) | |||
2398 | GNUNET_free (update_srch); | 2398 | GNUNET_free (update_srch); |
2399 | } | 2399 | } |
2400 | GNUNET_break (GNUNET_YES == | 2400 | GNUNET_break (GNUNET_YES == |
2401 | GNUNET_CONTAINER_multihashmap_put (sc->master_result_map, &sr->key, sr, | 2401 | GNUNET_CONTAINER_multihashmap_put (sc->master_result_map, |
2402 | &sr->key, sr, | ||
2402 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); | 2403 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); |
2403 | if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)) | 2404 | if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)) |
2404 | { | 2405 | { |
@@ -2588,7 +2589,7 @@ free_search_context (struct GNUNET_FS_SearchContext *sc) | |||
2588 | * | 2589 | * |
2589 | * @param cls the 'struct GNUNET_FS_DownloadContext*' (parent) | 2590 | * @param cls the 'struct GNUNET_FS_DownloadContext*' (parent) |
2590 | * @param filename complete filename (absolute path) | 2591 | * @param filename complete filename (absolute path) |
2591 | * @return GNUNET_OK (continue to iterate) | 2592 | * @return #GNUNET_OK (continue to iterate) |
2592 | */ | 2593 | */ |
2593 | static int | 2594 | static int |
2594 | deserialize_subdownload (void *cls, const char *filename) | 2595 | deserialize_subdownload (void *cls, const char *filename) |
@@ -2678,7 +2679,7 @@ deserialize_download (struct GNUNET_FS_Handle *h, | |||
2678 | 2679 | ||
2679 | uris = NULL; | 2680 | uris = NULL; |
2680 | emsg = NULL; | 2681 | emsg = NULL; |
2681 | dc = GNUNET_malloc (sizeof (struct GNUNET_FS_DownloadContext)); | 2682 | dc = GNUNET_new (struct GNUNET_FS_DownloadContext); |
2682 | dc->parent = parent; | 2683 | dc->parent = parent; |
2683 | dc->h = h; | 2684 | dc->h = h; |
2684 | dc->serialization = GNUNET_strdup (serialization); | 2685 | dc->serialization = GNUNET_strdup (serialization); |
@@ -2807,7 +2808,7 @@ deserialize_search (struct GNUNET_FS_Handle *h, | |||
2807 | } | 2808 | } |
2808 | uris = NULL; | 2809 | uris = NULL; |
2809 | emsg = NULL; | 2810 | emsg = NULL; |
2810 | sc = GNUNET_malloc (sizeof (struct GNUNET_FS_SearchContext)); | 2811 | sc = GNUNET_new (struct GNUNET_FS_SearchContext); |
2811 | if (NULL != psearch_result) | 2812 | if (NULL != psearch_result) |
2812 | { | 2813 | { |
2813 | sc->psearch_result = psearch_result; | 2814 | sc->psearch_result = psearch_result; |
@@ -2868,7 +2869,7 @@ cleanup: | |||
2868 | * | 2869 | * |
2869 | * @param cls the 'struct GNUNET_FS_Handle*' | 2870 | * @param cls the 'struct GNUNET_FS_Handle*' |
2870 | * @param filename complete filename (absolute path) | 2871 | * @param filename complete filename (absolute path) |
2871 | * @return GNUNET_OK (continue to iterate) | 2872 | * @return #GNUNET_OK (continue to iterate) |
2872 | */ | 2873 | */ |
2873 | static int | 2874 | static int |
2874 | deserialize_search_file (void *cls, const char *filename) | 2875 | deserialize_search_file (void *cls, const char *filename) |
@@ -2919,7 +2920,7 @@ deserialize_search_file (void *cls, const char *filename) | |||
2919 | * | 2920 | * |
2920 | * @param cls the 'struct GNUNET_FS_Handle*' | 2921 | * @param cls the 'struct GNUNET_FS_Handle*' |
2921 | * @param filename complete filename (absolute path) | 2922 | * @param filename complete filename (absolute path) |
2922 | * @return GNUNET_OK (continue to iterate) | 2923 | * @return #GNUNET_OK (continue to iterate) |
2923 | */ | 2924 | */ |
2924 | static int | 2925 | static int |
2925 | deserialize_download_file (void *cls, const char *filename) | 2926 | deserialize_download_file (void *cls, const char *filename) |