diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-05 16:32:34 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-05 16:32:34 +0200 |
commit | e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2 (patch) | |
tree | 61df772a93f7f21af7c715ddd4b9a3f1a50e0509 /src/fs/fs_api.c | |
parent | 1437556645417e6302862845e7ebcbd4c9908357 (diff) | |
download | gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip |
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r-- | src/fs/fs_api.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 3d2ba3e99..920786146 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -570,7 +570,7 @@ GNUNET_FS_data_reader_copy_ (void *cls, | |||
570 | return 0; | 570 | return 0; |
571 | if (0 == max) | 571 | if (0 == max) |
572 | { | 572 | { |
573 | GNUNET_free_non_null (data); | 573 | GNUNET_free (data); |
574 | return 0; | 574 | return 0; |
575 | } | 575 | } |
576 | GNUNET_memcpy (buf, &data[offset], max); | 576 | GNUNET_memcpy (buf, &data[offset], max); |
@@ -1132,15 +1132,15 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, | |||
1132 | GNUNET_free (filename); | 1132 | GNUNET_free (filename); |
1133 | filename = NULL; | 1133 | filename = NULL; |
1134 | } | 1134 | } |
1135 | GNUNET_free_non_null (ksks); | 1135 | GNUNET_free (ksks); |
1136 | GNUNET_free_non_null (skss); | 1136 | GNUNET_free (skss); |
1137 | GNUNET_free_non_null (chks); | 1137 | GNUNET_free (chks); |
1138 | return ret; | 1138 | return ret; |
1139 | cleanup: | 1139 | cleanup: |
1140 | GNUNET_free_non_null (ksks); | 1140 | GNUNET_free (ksks); |
1141 | GNUNET_free_non_null (chks); | 1141 | GNUNET_free (chks); |
1142 | GNUNET_free_non_null (skss); | 1142 | GNUNET_free (skss); |
1143 | GNUNET_free_non_null (filename); | 1143 | GNUNET_free (filename); |
1144 | GNUNET_FS_file_information_destroy (ret, NULL, NULL); | 1144 | GNUNET_FS_file_information_destroy (ret, NULL, NULL); |
1145 | return NULL; | 1145 | return NULL; |
1146 | } | 1146 | } |
@@ -1417,11 +1417,11 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi) | |||
1417 | GNUNET_break (0); | 1417 | GNUNET_break (0); |
1418 | goto cleanup; | 1418 | goto cleanup; |
1419 | } | 1419 | } |
1420 | GNUNET_free_non_null (chks); | 1420 | GNUNET_free (chks); |
1421 | chks = NULL; | 1421 | chks = NULL; |
1422 | GNUNET_free_non_null (ksks); | 1422 | GNUNET_free (ksks); |
1423 | ksks = NULL; | 1423 | ksks = NULL; |
1424 | GNUNET_free_non_null (skss); | 1424 | GNUNET_free (skss); |
1425 | skss = NULL; | 1425 | skss = NULL; |
1426 | 1426 | ||
1427 | switch (b) | 1427 | switch (b) |
@@ -1527,9 +1527,9 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi) | |||
1527 | cleanup: | 1527 | cleanup: |
1528 | if (NULL != wh) | 1528 | if (NULL != wh) |
1529 | (void) GNUNET_BIO_write_close (wh, NULL); | 1529 | (void) GNUNET_BIO_write_close (wh, NULL); |
1530 | GNUNET_free_non_null (chks); | 1530 | GNUNET_free (chks); |
1531 | GNUNET_free_non_null (ksks); | 1531 | GNUNET_free (ksks); |
1532 | GNUNET_free_non_null (skss); | 1532 | GNUNET_free (skss); |
1533 | fn = get_serialization_file_name (fi->h, | 1533 | fn = get_serialization_file_name (fi->h, |
1534 | GNUNET_FS_SYNC_PATH_FILE_INFO, | 1534 | GNUNET_FS_SYNC_PATH_FILE_INFO, |
1535 | fi->serialization); | 1535 | fi->serialization); |
@@ -1729,10 +1729,10 @@ deserialize_publish_file (void *cls, const char *filename) | |||
1729 | pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc); | 1729 | pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc); |
1730 | return GNUNET_OK; | 1730 | return GNUNET_OK; |
1731 | cleanup: | 1731 | cleanup: |
1732 | GNUNET_free_non_null (pc->nid); | 1732 | GNUNET_free (pc->nid); |
1733 | GNUNET_free_non_null (pc->nuid); | 1733 | GNUNET_free (pc->nuid); |
1734 | GNUNET_free_non_null (fi_root); | 1734 | GNUNET_free (fi_root); |
1735 | GNUNET_free_non_null (fi_pos); | 1735 | GNUNET_free (fi_pos); |
1736 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) | 1736 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) |
1737 | { | 1737 | { |
1738 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1738 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -2131,7 +2131,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc) | |||
2131 | goto cleanup; | 2131 | goto cleanup; |
2132 | } | 2132 | } |
2133 | } | 2133 | } |
2134 | GNUNET_free_non_null (uris); | 2134 | GNUNET_free (uris); |
2135 | uris = NULL; | 2135 | uris = NULL; |
2136 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) | 2136 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) |
2137 | { | 2137 | { |
@@ -2144,7 +2144,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc) | |||
2144 | cleanup: | 2144 | cleanup: |
2145 | if (NULL != wh) | 2145 | if (NULL != wh) |
2146 | (void) GNUNET_BIO_write_close (wh, NULL); | 2146 | (void) GNUNET_BIO_write_close (wh, NULL); |
2147 | GNUNET_free_non_null (uris); | 2147 | GNUNET_free (uris); |
2148 | if (0 != unlink (fn)) | 2148 | if (0 != unlink (fn)) |
2149 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); | 2149 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); |
2150 | GNUNET_free (fn); | 2150 | GNUNET_free (fn); |
@@ -2235,10 +2235,10 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr) | |||
2235 | GNUNET_break (0); | 2235 | GNUNET_break (0); |
2236 | goto cleanup; | 2236 | goto cleanup; |
2237 | } | 2237 | } |
2238 | GNUNET_free_non_null (uris); | 2238 | GNUNET_free (uris); |
2239 | return; | 2239 | return; |
2240 | cleanup: | 2240 | cleanup: |
2241 | GNUNET_free_non_null (uris); | 2241 | GNUNET_free (uris); |
2242 | if (NULL != wh) | 2242 | if (NULL != wh) |
2243 | (void) GNUNET_BIO_write_close (wh, NULL); | 2243 | (void) GNUNET_BIO_write_close (wh, NULL); |
2244 | remove_sync_file_in_dir (sr->h, | 2244 | remove_sync_file_in_dir (sr->h, |
@@ -2309,7 +2309,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc) | |||
2309 | cleanup: | 2309 | cleanup: |
2310 | if (NULL != wh) | 2310 | if (NULL != wh) |
2311 | (void) GNUNET_BIO_write_close (wh, NULL); | 2311 | (void) GNUNET_BIO_write_close (wh, NULL); |
2312 | GNUNET_free_non_null (uris); | 2312 | GNUNET_free (uris); |
2313 | GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization); | 2313 | GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization); |
2314 | GNUNET_free (sc->serialization); | 2314 | GNUNET_free (sc->serialization); |
2315 | sc->serialization = NULL; | 2315 | sc->serialization = NULL; |
@@ -2359,7 +2359,7 @@ deserialize_unindex_file (void *cls, const char *filename) | |||
2359 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset", | 2359 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset", |
2360 | (int32_t *) &uc->ksk_offset))) | 2360 | (int32_t *) &uc->ksk_offset))) |
2361 | { | 2361 | { |
2362 | GNUNET_free_non_null (uris); | 2362 | GNUNET_free (uris); |
2363 | GNUNET_break (0); | 2363 | GNUNET_break (0); |
2364 | goto cleanup; | 2364 | goto cleanup; |
2365 | } | 2365 | } |
@@ -2370,7 +2370,7 @@ deserialize_unindex_file (void *cls, const char *filename) | |||
2370 | if (NULL == uc->ksk_uri) | 2370 | if (NULL == uc->ksk_uri) |
2371 | { | 2371 | { |
2372 | GNUNET_break (0); | 2372 | GNUNET_break (0); |
2373 | GNUNET_free_non_null (emsg); | 2373 | GNUNET_free (emsg); |
2374 | goto cleanup; | 2374 | goto cleanup; |
2375 | } | 2375 | } |
2376 | } | 2376 | } |
@@ -2472,7 +2472,7 @@ deserialize_unindex_file (void *cls, const char *filename) | |||
2472 | } | 2472 | } |
2473 | return GNUNET_OK; | 2473 | return GNUNET_OK; |
2474 | cleanup: | 2474 | cleanup: |
2475 | GNUNET_free_non_null (uc->filename); | 2475 | GNUNET_free (uc->filename); |
2476 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) | 2476 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) |
2477 | { | 2477 | { |
2478 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2478 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -2485,7 +2485,7 @@ cleanup: | |||
2485 | GNUNET_FS_remove_sync_file_ (h, | 2485 | GNUNET_FS_remove_sync_file_ (h, |
2486 | GNUNET_FS_SYNC_PATH_MASTER_UNINDEX, | 2486 | GNUNET_FS_SYNC_PATH_MASTER_UNINDEX, |
2487 | uc->serialization); | 2487 | uc->serialization); |
2488 | GNUNET_free_non_null (uc->serialization); | 2488 | GNUNET_free (uc->serialization); |
2489 | GNUNET_free (uc); | 2489 | GNUNET_free (uc); |
2490 | return GNUNET_OK; | 2490 | return GNUNET_OK; |
2491 | } | 2491 | } |
@@ -2665,10 +2665,10 @@ deserialize_search_result (void *cls, const char *filename) | |||
2665 | } | 2665 | } |
2666 | return GNUNET_OK; | 2666 | return GNUNET_OK; |
2667 | cleanup: | 2667 | cleanup: |
2668 | GNUNET_free_non_null (download); | 2668 | GNUNET_free (download); |
2669 | GNUNET_free_non_null (emsg); | 2669 | GNUNET_free (emsg); |
2670 | GNUNET_free_non_null (uris); | 2670 | GNUNET_free (uris); |
2671 | GNUNET_free_non_null (update_srch); | 2671 | GNUNET_free (update_srch); |
2672 | if (NULL != sr->uri) | 2672 | if (NULL != sr->uri) |
2673 | GNUNET_FS_uri_destroy (sr->uri); | 2673 | GNUNET_FS_uri_destroy (sr->uri); |
2674 | if (NULL != sr->meta) | 2674 | if (NULL != sr->meta) |
@@ -2823,8 +2823,8 @@ free_search_context (struct GNUNET_FS_SearchContext *sc) | |||
2823 | : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, | 2823 | : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, |
2824 | sc->serialization); | 2824 | sc->serialization); |
2825 | } | 2825 | } |
2826 | GNUNET_free_non_null (sc->serialization); | 2826 | GNUNET_free (sc->serialization); |
2827 | GNUNET_free_non_null (sc->emsg); | 2827 | GNUNET_free (sc->emsg); |
2828 | if (NULL != sc->uri) | 2828 | if (NULL != sc->uri) |
2829 | GNUNET_FS_uri_destroy (sc->uri); | 2829 | GNUNET_FS_uri_destroy (sc->uri); |
2830 | if (NULL != sc->master_result_map) | 2830 | if (NULL != sc->master_result_map) |
@@ -2896,10 +2896,10 @@ free_download_context (struct GNUNET_FS_DownloadContext *dc) | |||
2896 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); | 2896 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); |
2897 | if (NULL != dc->uri) | 2897 | if (NULL != dc->uri) |
2898 | GNUNET_FS_uri_destroy (dc->uri); | 2898 | GNUNET_FS_uri_destroy (dc->uri); |
2899 | GNUNET_free_non_null (dc->temp_filename); | 2899 | GNUNET_free (dc->temp_filename); |
2900 | GNUNET_free_non_null (dc->emsg); | 2900 | GNUNET_free (dc->emsg); |
2901 | GNUNET_free_non_null (dc->filename); | 2901 | GNUNET_free (dc->filename); |
2902 | GNUNET_free_non_null (dc->serialization); | 2902 | GNUNET_free (dc->serialization); |
2903 | while (NULL != (dcc = dc->child_head)) | 2903 | while (NULL != (dcc = dc->child_head)) |
2904 | { | 2904 | { |
2905 | GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc); | 2905 | GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc); |
@@ -3020,8 +3020,8 @@ deserialize_download (struct GNUNET_FS_Handle *h, | |||
3020 | dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc); | 3020 | dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc); |
3021 | return; | 3021 | return; |
3022 | cleanup: | 3022 | cleanup: |
3023 | GNUNET_free_non_null (uris); | 3023 | GNUNET_free (uris); |
3024 | GNUNET_free_non_null (emsg); | 3024 | GNUNET_free (emsg); |
3025 | free_download_context (dc); | 3025 | free_download_context (dc); |
3026 | } | 3026 | } |
3027 | 3027 | ||
@@ -3127,9 +3127,9 @@ deserialize_search (struct GNUNET_FS_Handle *h, | |||
3127 | GNUNET_free (uris); | 3127 | GNUNET_free (uris); |
3128 | return sc; | 3128 | return sc; |
3129 | cleanup: | 3129 | cleanup: |
3130 | GNUNET_free_non_null (emsg); | 3130 | GNUNET_free (emsg); |
3131 | free_search_context (sc); | 3131 | free_search_context (sc); |
3132 | GNUNET_free_non_null (uris); | 3132 | GNUNET_free (uris); |
3133 | return NULL; | 3133 | return NULL; |
3134 | } | 3134 | } |
3135 | 3135 | ||