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/util | |
parent | 1437556645417e6302862845e7ebcbd4c9908357 (diff) | |
download | gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip |
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/bio.c | 16 | ||||
-rw-r--r-- | src/util/buffer.c | 2 | ||||
-rw-r--r-- | src/util/client.c | 10 | ||||
-rw-r--r-- | src/util/common_allocation.c | 5 | ||||
-rw-r--r-- | src/util/common_logging.c | 6 | ||||
-rw-r--r-- | src/util/configuration.c | 12 | ||||
-rw-r--r-- | src/util/container_bloomfilter.c | 2 | ||||
-rw-r--r-- | src/util/container_meta_data.c | 14 | ||||
-rw-r--r-- | src/util/disk.c | 4 | ||||
-rw-r--r-- | src/util/dnsparser.c | 26 | ||||
-rw-r--r-- | src/util/getopt_helpers.c | 4 | ||||
-rw-r--r-- | src/util/gnunet-config.c | 2 | ||||
-rw-r--r-- | src/util/gnunet-scrypt.c | 2 | ||||
-rw-r--r-- | src/util/gnunet-service-resolver.c | 12 | ||||
-rw-r--r-- | src/util/mq.c | 2 | ||||
-rw-r--r-- | src/util/network.c | 2 | ||||
-rw-r--r-- | src/util/os_installation.c | 8 | ||||
-rw-r--r-- | src/util/program.c | 8 | ||||
-rw-r--r-- | src/util/regex.c | 14 | ||||
-rw-r--r-- | src/util/service.c | 40 | ||||
-rw-r--r-- | src/util/socks.c | 6 | ||||
-rw-r--r-- | src/util/strings.c | 2 | ||||
-rw-r--r-- | src/util/test_common_allocation.c | 6 | ||||
-rw-r--r-- | src/util/test_configuration.c | 2 | ||||
-rw-r--r-- | src/util/test_container_meta_data.c | 2 | ||||
-rw-r--r-- | src/util/test_crypto_symmetric.c | 2 | ||||
-rw-r--r-- | src/util/test_resolver_api.c | 2 |
27 files changed, 106 insertions, 107 deletions
diff --git a/src/util/bio.c b/src/util/bio.c index ce15f073b..b27230240 100644 --- a/src/util/bio.c +++ b/src/util/bio.c | |||
@@ -171,7 +171,7 @@ GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) | |||
171 | if (NULL != emsg) | 171 | if (NULL != emsg) |
172 | *emsg = h->emsg; | 172 | *emsg = h->emsg; |
173 | else | 173 | else |
174 | GNUNET_free_non_null (h->emsg); | 174 | GNUNET_free (h->emsg); |
175 | switch (h->type) | 175 | switch (h->type) |
176 | { | 176 | { |
177 | case IO_FILE: | 177 | case IO_FILE: |
@@ -345,7 +345,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | |||
345 | GNUNET_asprintf (&h->emsg, | 345 | GNUNET_asprintf (&h->emsg, |
346 | _ ("Error reading length of string `%s'"), | 346 | _ ("Error reading length of string `%s'"), |
347 | what); | 347 | what); |
348 | GNUNET_free_non_null (tmp); | 348 | GNUNET_free (tmp); |
349 | return GNUNET_SYSERR; | 349 | return GNUNET_SYSERR; |
350 | } | 350 | } |
351 | if (0 == big) | 351 | if (0 == big) |
@@ -612,7 +612,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg) | |||
612 | if (NULL != emsg) | 612 | if (NULL != emsg) |
613 | *emsg = h->emsg; | 613 | *emsg = h->emsg; |
614 | else | 614 | else |
615 | GNUNET_free_non_null (h->emsg); | 615 | GNUNET_free (h->emsg); |
616 | switch (h->type) | 616 | switch (h->type) |
617 | { | 617 | { |
618 | case IO_FILE: | 618 | case IO_FILE: |
@@ -623,7 +623,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg) | |||
623 | if (NULL != emsg) | 623 | if (NULL != emsg) |
624 | *emsg = h->emsg; | 624 | *emsg = h->emsg; |
625 | else | 625 | else |
626 | GNUNET_free_non_null (h->emsg); | 626 | GNUNET_free (h->emsg); |
627 | err = GNUNET_SYSERR; | 627 | err = GNUNET_SYSERR; |
628 | } | 628 | } |
629 | else | 629 | else |
@@ -663,7 +663,7 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h) | |||
663 | { | 663 | { |
664 | GNUNET_DISK_file_close (h->fd); | 664 | GNUNET_DISK_file_close (h->fd); |
665 | h->fd = NULL; | 665 | h->fd = NULL; |
666 | GNUNET_free_non_null (h->emsg); | 666 | GNUNET_free (h->emsg); |
667 | GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file")); | 667 | GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file")); |
668 | return GNUNET_SYSERR; | 668 | return GNUNET_SYSERR; |
669 | } | 669 | } |
@@ -698,7 +698,7 @@ GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h, | |||
698 | if (NULL != emsg) | 698 | if (NULL != emsg) |
699 | *emsg = h->emsg; | 699 | *emsg = h->emsg; |
700 | else | 700 | else |
701 | GNUNET_free_non_null (h->emsg); | 701 | GNUNET_free (h->emsg); |
702 | *contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size); | 702 | *contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size); |
703 | return ret; | 703 | return ret; |
704 | } | 704 | } |
@@ -750,7 +750,7 @@ write_to_file (struct GNUNET_BIO_WriteHandle *h, | |||
750 | _ ("Error while writing `%s' to file: %s"), | 750 | _ ("Error while writing `%s' to file: %s"), |
751 | what, | 751 | what, |
752 | tmp); | 752 | tmp); |
753 | GNUNET_free_non_null (tmp); | 753 | GNUNET_free (tmp); |
754 | return GNUNET_SYSERR; | 754 | return GNUNET_SYSERR; |
755 | } | 755 | } |
756 | } | 756 | } |
@@ -870,7 +870,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, | |||
870 | if (-1 == size) | 870 | if (-1 == size) |
871 | { | 871 | { |
872 | GNUNET_free (buf); | 872 | GNUNET_free (buf); |
873 | GNUNET_free_non_null (h->emsg); | 873 | GNUNET_free (h->emsg); |
874 | GNUNET_asprintf (&h->emsg, | 874 | GNUNET_asprintf (&h->emsg, |
875 | _ ("Failed to serialize metadata `%s'"), | 875 | _ ("Failed to serialize metadata `%s'"), |
876 | what); | 876 | what); |
diff --git a/src/util/buffer.c b/src/util/buffer.c index c865f6307..d0261889e 100644 --- a/src/util/buffer.c +++ b/src/util/buffer.c | |||
@@ -162,7 +162,7 @@ GNUNET_buffer_reap (struct GNUNET_Buffer *buf, size_t *size) | |||
162 | void | 162 | void |
163 | GNUNET_buffer_clear (struct GNUNET_Buffer *buf) | 163 | GNUNET_buffer_clear (struct GNUNET_Buffer *buf) |
164 | { | 164 | { |
165 | GNUNET_free_non_null (buf->mem); | 165 | GNUNET_free (buf->mem); |
166 | memset (buf, 0, sizeof (struct GNUNET_Buffer)); | 166 | memset (buf, 0, sizeof (struct GNUNET_Buffer)); |
167 | } | 167 | } |
168 | 168 | ||
diff --git a/src/util/client.c b/src/util/client.c index a7b1a2a0f..86dabe664 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -422,7 +422,7 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq, | |||
422 | } | 422 | } |
423 | cancel_aps (cstate); | 423 | cancel_aps (cstate); |
424 | GNUNET_free (cstate->service_name); | 424 | GNUNET_free (cstate->service_name); |
425 | GNUNET_free_non_null (cstate->hostname); | 425 | GNUNET_free (cstate->hostname); |
426 | GNUNET_MST_destroy (cstate->mst); | 426 | GNUNET_MST_destroy (cstate->mst); |
427 | GNUNET_free (cstate); | 427 | GNUNET_free (cstate); |
428 | } | 428 | } |
@@ -563,7 +563,7 @@ try_unixpath (const char *service_name, | |||
563 | if (NULL != sock) | 563 | if (NULL != sock) |
564 | GNUNET_NETWORK_socket_close (sock); | 564 | GNUNET_NETWORK_socket_close (sock); |
565 | } | 565 | } |
566 | GNUNET_free_non_null (unixpath); | 566 | GNUNET_free (unixpath); |
567 | #endif | 567 | #endif |
568 | return NULL; | 568 | return NULL; |
569 | } | 569 | } |
@@ -747,7 +747,7 @@ test_service_configuration (const char *service_name, | |||
747 | _ ("not a valid filename")); | 747 | _ ("not a valid filename")); |
748 | return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */ | 748 | return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */ |
749 | } | 749 | } |
750 | GNUNET_free_non_null (unixpath); | 750 | GNUNET_free (unixpath); |
751 | #endif | 751 | #endif |
752 | 752 | ||
753 | if ((GNUNET_YES == | 753 | if ((GNUNET_YES == |
@@ -768,7 +768,7 @@ test_service_configuration (const char *service_name, | |||
768 | &hostname)) && | 768 | &hostname)) && |
769 | (0 != strlen (hostname))) | 769 | (0 != strlen (hostname))) |
770 | ret = GNUNET_OK; | 770 | ret = GNUNET_OK; |
771 | GNUNET_free_non_null (hostname); | 771 | GNUNET_free (hostname); |
772 | return ret; | 772 | return ret; |
773 | } | 773 | } |
774 | 774 | ||
@@ -1043,7 +1043,7 @@ GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1043 | /* service running remotely */ | 1043 | /* service running remotely */ |
1044 | ret = GNUNET_OK; | 1044 | ret = GNUNET_OK; |
1045 | } | 1045 | } |
1046 | GNUNET_free_non_null (hostname); | 1046 | GNUNET_free (hostname); |
1047 | return ret; | 1047 | return ret; |
1048 | } | 1048 | } |
1049 | 1049 | ||
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index fd91e23b2..4aad49777 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -323,13 +323,12 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber) | |||
323 | * want to keep track of allocations. | 323 | * want to keep track of allocations. |
324 | * | 324 | * |
325 | * @param ptr the pointer to free | 325 | * @param ptr the pointer to free |
326 | * @param filename where in the code was the call to GNUNET_free | 326 | * @param filename where in the code was the call to GNUNET_free() |
327 | * @param linenumber where in the code was the call to GNUNET_free | 327 | * @param linenumber where in the code was the call to GNUNET_free() |
328 | */ | 328 | */ |
329 | void | 329 | void |
330 | GNUNET_xfree_ (void *ptr, const char *filename, int linenumber) | 330 | GNUNET_xfree_ (void *ptr, const char *filename, int linenumber) |
331 | { | 331 | { |
332 | GNUNET_assert_at (NULL != ptr, filename, linenumber); | ||
333 | #ifdef W32_MEM_LIMIT | 332 | #ifdef W32_MEM_LIMIT |
334 | ptr = &((size_t *) ptr)[-1]; | 333 | ptr = &((size_t *) ptr)[-1]; |
335 | mem_used -= *((size_t *) ptr); | 334 | mem_used -= *((size_t *) ptr); |
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 3894cdda1..b30175543 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -715,9 +715,9 @@ GNUNET_log_setup (const char *comp, | |||
715 | #if ! defined(GNUNET_CULL_LOGGING) | 715 | #if ! defined(GNUNET_CULL_LOGGING) |
716 | parse_all_definitions (); | 716 | parse_all_definitions (); |
717 | #endif | 717 | #endif |
718 | GNUNET_free_non_null (component); | 718 | GNUNET_free (component); |
719 | GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); | 719 | GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); |
720 | GNUNET_free_non_null (component_nopid); | 720 | GNUNET_free (component_nopid); |
721 | component_nopid = GNUNET_strdup (comp); | 721 | component_nopid = GNUNET_strdup (comp); |
722 | 722 | ||
723 | env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); | 723 | env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); |
@@ -725,7 +725,7 @@ GNUNET_log_setup (const char *comp, | |||
725 | logfile = env_logfile; | 725 | logfile = env_logfile; |
726 | if (NULL == logfile) | 726 | if (NULL == logfile) |
727 | return GNUNET_OK; | 727 | return GNUNET_OK; |
728 | GNUNET_free_non_null (log_file_name); | 728 | GNUNET_free (log_file_name); |
729 | log_file_name = GNUNET_STRINGS_filename_expand (logfile); | 729 | log_file_name = GNUNET_STRINGS_filename_expand (logfile); |
730 | if (NULL == log_file_name) | 730 | if (NULL == log_file_name) |
731 | return GNUNET_SYSERR; | 731 | return GNUNET_SYSERR; |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 7ed87cc1e..34ecc9e73 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -286,7 +286,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
286 | line_orig = NULL; | 286 | line_orig = NULL; |
287 | while (r_bytes < size) | 287 | while (r_bytes < size) |
288 | { | 288 | { |
289 | GNUNET_free_non_null (line_orig); | 289 | GNUNET_free (line_orig); |
290 | /* fgets-like behaviour on buffer */ | 290 | /* fgets-like behaviour on buffer */ |
291 | to_read = size - r_bytes; | 291 | to_read = size - r_bytes; |
292 | pos = memchr (&mem[r_bytes], '\n', to_read); | 292 | pos = memchr (&mem[r_bytes], '\n', to_read); |
@@ -404,7 +404,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
404 | ret = GNUNET_SYSERR; | 404 | ret = GNUNET_SYSERR; |
405 | break; | 405 | break; |
406 | } | 406 | } |
407 | GNUNET_free_non_null (line_orig); | 407 | GNUNET_free (line_orig); |
408 | GNUNET_free (section); | 408 | GNUNET_free (section); |
409 | GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size)); | 409 | GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size)); |
410 | return ret; | 410 | return ret; |
@@ -734,7 +734,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
734 | { | 734 | { |
735 | spos->entries = ent->next; | 735 | spos->entries = ent->next; |
736 | GNUNET_free (ent->key); | 736 | GNUNET_free (ent->key); |
737 | GNUNET_free_non_null (ent->val); | 737 | GNUNET_free (ent->val); |
738 | GNUNET_free (ent); | 738 | GNUNET_free (ent); |
739 | cfg->dirty = GNUNET_YES; | 739 | cfg->dirty = GNUNET_YES; |
740 | } | 740 | } |
@@ -926,13 +926,13 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
926 | { | 926 | { |
927 | if (NULL == value) | 927 | if (NULL == value) |
928 | { | 928 | { |
929 | GNUNET_free_non_null (e->val); | 929 | GNUNET_free (e->val); |
930 | e->val = NULL; | 930 | e->val = NULL; |
931 | } | 931 | } |
932 | else | 932 | else |
933 | { | 933 | { |
934 | nv = GNUNET_strdup (value); | 934 | nv = GNUNET_strdup (value); |
935 | GNUNET_free_non_null (e->val); | 935 | GNUNET_free (e->val); |
936 | e->val = nv; | 936 | e->val = nv; |
937 | } | 937 | } |
938 | return; | 938 | return; |
@@ -1383,7 +1383,7 @@ expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1383 | result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1); | 1383 | result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1); |
1384 | strcpy (result, prefix); | 1384 | strcpy (result, prefix); |
1385 | strcat (result, post); | 1385 | strcat (result, post); |
1386 | GNUNET_free_non_null (def); | 1386 | GNUNET_free (def); |
1387 | GNUNET_free (prefix); | 1387 | GNUNET_free (prefix); |
1388 | GNUNET_free (orig); | 1388 | GNUNET_free (orig); |
1389 | return result; | 1389 | return result; |
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c index eca651862..d7460043d 100644 --- a/src/util/container_bloomfilter.c +++ b/src/util/container_bloomfilter.c | |||
@@ -707,7 +707,7 @@ GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf) | |||
707 | return; | 707 | return; |
708 | if (bf->fh != NULL) | 708 | if (bf->fh != NULL) |
709 | GNUNET_DISK_file_close (bf->fh); | 709 | GNUNET_DISK_file_close (bf->fh); |
710 | GNUNET_free_non_null (bf->filename); | 710 | GNUNET_free (bf->filename); |
711 | GNUNET_free (bf->bitArray); | 711 | GNUNET_free (bf->bitArray); |
712 | GNUNET_free (bf); | 712 | GNUNET_free (bf); |
713 | } | 713 | } |
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index ad362408e..b66a7b258 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -217,9 +217,9 @@ GNUNET_CONTAINER_meta_data_create () | |||
217 | static void | 217 | static void |
218 | meta_item_free (struct MetaItem *mi) | 218 | meta_item_free (struct MetaItem *mi) |
219 | { | 219 | { |
220 | GNUNET_free_non_null (mi->plugin_name); | 220 | GNUNET_free (mi->plugin_name); |
221 | GNUNET_free_non_null (mi->mime_type); | 221 | GNUNET_free (mi->mime_type); |
222 | GNUNET_free_non_null (mi->data); | 222 | GNUNET_free (mi->data); |
223 | GNUNET_free (mi); | 223 | GNUNET_free (mi); |
224 | } | 224 | } |
225 | 225 | ||
@@ -258,7 +258,7 @@ GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md) | |||
258 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos); | 258 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos); |
259 | meta_item_free (pos); | 259 | meta_item_free (pos); |
260 | } | 260 | } |
261 | GNUNET_free_non_null (md->sbuf); | 261 | GNUNET_free (md->sbuf); |
262 | GNUNET_free (md); | 262 | GNUNET_free (md); |
263 | } | 263 | } |
264 | 264 | ||
@@ -280,7 +280,7 @@ GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md) | |||
280 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi); | 280 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi); |
281 | meta_item_free (mi); | 281 | meta_item_free (mi); |
282 | } | 282 | } |
283 | GNUNET_free_non_null (md->sbuf); | 283 | GNUNET_free (md->sbuf); |
284 | memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData)); | 284 | memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData)); |
285 | } | 285 | } |
286 | 286 | ||
@@ -976,7 +976,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData | |||
976 | if (NULL != pos->mime_type) | 976 | if (NULL != pos->mime_type) |
977 | left -= strlen (pos->mime_type) + 1; | 977 | left -= strlen (pos->mime_type) + 1; |
978 | 978 | ||
979 | GNUNET_free_non_null (cdata); | 979 | GNUNET_free (cdata); |
980 | cdata = NULL; | 980 | cdata = NULL; |
981 | 981 | ||
982 | i++; | 982 | i++; |
@@ -1180,7 +1180,7 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size) | |||
1180 | ntohl (ent.type), format, mime_type, | 1180 | ntohl (ent.type), format, mime_type, |
1181 | meta_data, dlen); | 1181 | meta_data, dlen); |
1182 | } | 1182 | } |
1183 | GNUNET_free_non_null (data); | 1183 | GNUNET_free (data); |
1184 | return md; | 1184 | return md; |
1185 | } | 1185 | } |
1186 | 1186 | ||
diff --git a/src/util/disk.c b/src/util/disk.c index 9018aa955..cdead59d2 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -1556,8 +1556,8 @@ GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]) | |||
1556 | GNUNET_break (0 == close (p->fd[0]->fd)); | 1556 | GNUNET_break (0 == close (p->fd[0]->fd)); |
1557 | if (p->fd[1]->fd >= 0) | 1557 | if (p->fd[1]->fd >= 0) |
1558 | GNUNET_break (0 == close (p->fd[1]->fd)); | 1558 | GNUNET_break (0 == close (p->fd[1]->fd)); |
1559 | GNUNET_free_non_null (p->fd[0]); | 1559 | GNUNET_free (p->fd[0]); |
1560 | GNUNET_free_non_null (p->fd[1]); | 1560 | GNUNET_free (p->fd[1]); |
1561 | GNUNET_free (p); | 1561 | GNUNET_free (p); |
1562 | errno = eno; | 1562 | errno = eno; |
1563 | return NULL; | 1563 | return NULL; |
diff --git a/src/util/dnsparser.c b/src/util/dnsparser.c index ab687414e..401723106 100644 --- a/src/util/dnsparser.c +++ b/src/util/dnsparser.c | |||
@@ -109,8 +109,8 @@ GNUNET_DNSPARSER_free_soa (struct GNUNET_DNSPARSER_SoaRecord *soa) | |||
109 | { | 109 | { |
110 | if (NULL == soa) | 110 | if (NULL == soa) |
111 | return; | 111 | return; |
112 | GNUNET_free_non_null (soa->mname); | 112 | GNUNET_free (soa->mname); |
113 | GNUNET_free_non_null (soa->rname); | 113 | GNUNET_free (soa->rname); |
114 | GNUNET_free (soa); | 114 | GNUNET_free (soa); |
115 | } | 115 | } |
116 | 116 | ||
@@ -125,7 +125,7 @@ GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert) | |||
125 | { | 125 | { |
126 | if (NULL == cert) | 126 | if (NULL == cert) |
127 | return; | 127 | return; |
128 | GNUNET_free_non_null (cert->certificate_data); | 128 | GNUNET_free (cert->certificate_data); |
129 | GNUNET_free (cert); | 129 | GNUNET_free (cert); |
130 | } | 130 | } |
131 | 131 | ||
@@ -140,7 +140,7 @@ GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv) | |||
140 | { | 140 | { |
141 | if (NULL == srv) | 141 | if (NULL == srv) |
142 | return; | 142 | return; |
143 | GNUNET_free_non_null (srv->target); | 143 | GNUNET_free (srv->target); |
144 | GNUNET_free (srv); | 144 | GNUNET_free (srv); |
145 | } | 145 | } |
146 | 146 | ||
@@ -155,7 +155,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx) | |||
155 | { | 155 | { |
156 | if (NULL == mx) | 156 | if (NULL == mx) |
157 | return; | 157 | return; |
158 | GNUNET_free_non_null (mx->mxhost); | 158 | GNUNET_free (mx->mxhost); |
159 | GNUNET_free (mx); | 159 | GNUNET_free (mx); |
160 | } | 160 | } |
161 | 161 | ||
@@ -168,7 +168,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx) | |||
168 | void | 168 | void |
169 | GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) | 169 | GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) |
170 | { | 170 | { |
171 | GNUNET_free_non_null (r->name); | 171 | GNUNET_free (r->name); |
172 | switch (r->type) | 172 | switch (r->type) |
173 | { | 173 | { |
174 | case GNUNET_DNSPARSER_TYPE_MX: | 174 | case GNUNET_DNSPARSER_TYPE_MX: |
@@ -190,11 +190,11 @@ GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) | |||
190 | case GNUNET_DNSPARSER_TYPE_NS: | 190 | case GNUNET_DNSPARSER_TYPE_NS: |
191 | case GNUNET_DNSPARSER_TYPE_CNAME: | 191 | case GNUNET_DNSPARSER_TYPE_CNAME: |
192 | case GNUNET_DNSPARSER_TYPE_PTR: | 192 | case GNUNET_DNSPARSER_TYPE_PTR: |
193 | GNUNET_free_non_null (r->data.hostname); | 193 | GNUNET_free (r->data.hostname); |
194 | break; | 194 | break; |
195 | 195 | ||
196 | default: | 196 | default: |
197 | GNUNET_free_non_null (r->data.raw.data); | 197 | GNUNET_free (r->data.raw.data); |
198 | break; | 198 | break; |
199 | } | 199 | } |
200 | } | 200 | } |
@@ -854,17 +854,17 @@ void | |||
854 | GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p) | 854 | GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p) |
855 | { | 855 | { |
856 | for (unsigned int i = 0; i < p->num_queries; i++) | 856 | for (unsigned int i = 0; i < p->num_queries; i++) |
857 | GNUNET_free_non_null (p->queries[i].name); | 857 | GNUNET_free (p->queries[i].name); |
858 | GNUNET_free_non_null (p->queries); | 858 | GNUNET_free (p->queries); |
859 | for (unsigned int i = 0; i < p->num_answers; i++) | 859 | for (unsigned int i = 0; i < p->num_answers; i++) |
860 | GNUNET_DNSPARSER_free_record (&p->answers[i]); | 860 | GNUNET_DNSPARSER_free_record (&p->answers[i]); |
861 | GNUNET_free_non_null (p->answers); | 861 | GNUNET_free (p->answers); |
862 | for (unsigned int i = 0; i < p->num_authority_records; i++) | 862 | for (unsigned int i = 0; i < p->num_authority_records; i++) |
863 | GNUNET_DNSPARSER_free_record (&p->authority_records[i]); | 863 | GNUNET_DNSPARSER_free_record (&p->authority_records[i]); |
864 | GNUNET_free_non_null (p->authority_records); | 864 | GNUNET_free (p->authority_records); |
865 | for (unsigned int i = 0; i < p->num_additional_records; i++) | 865 | for (unsigned int i = 0; i < p->num_additional_records; i++) |
866 | GNUNET_DNSPARSER_free_record (&p->additional_records[i]); | 866 | GNUNET_DNSPARSER_free_record (&p->additional_records[i]); |
867 | GNUNET_free_non_null (p->additional_records); | 867 | GNUNET_free (p->additional_records); |
868 | GNUNET_free (p); | 868 | GNUNET_free (p); |
869 | } | 869 | } |
870 | 870 | ||
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index a56ef2d96..592875531 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -377,7 +377,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
377 | (void) ctx; | 377 | (void) ctx; |
378 | (void) option; | 378 | (void) option; |
379 | GNUNET_assert (NULL != value); | 379 | GNUNET_assert (NULL != value); |
380 | GNUNET_free_non_null (*val); | 380 | GNUNET_free (*val); |
381 | *val = GNUNET_strdup (value); | 381 | *val = GNUNET_strdup (value); |
382 | return GNUNET_OK; | 382 | return GNUNET_OK; |
383 | } | 383 | } |
@@ -458,7 +458,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
458 | (void) ctx; | 458 | (void) ctx; |
459 | (void) option; | 459 | (void) option; |
460 | GNUNET_assert (NULL != value); | 460 | GNUNET_assert (NULL != value); |
461 | GNUNET_free_non_null (*val); | 461 | GNUNET_free (*val); |
462 | *val = GNUNET_STRINGS_filename_expand (value); | 462 | *val = GNUNET_STRINGS_filename_expand (value); |
463 | return GNUNET_OK; | 463 | return GNUNET_OK; |
464 | } | 464 | } |
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 5883c1497..2b279dda2 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -258,7 +258,7 @@ run (void *cls, | |||
258 | GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile)) | 258 | GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile)) |
259 | global_ret = 2; | 259 | global_ret = 2; |
260 | } | 260 | } |
261 | GNUNET_free_non_null (cfg_fn); | 261 | GNUNET_free (cfg_fn); |
262 | if (NULL != out) | 262 | if (NULL != out) |
263 | GNUNET_CONFIGURATION_destroy (out); | 263 | GNUNET_CONFIGURATION_destroy (out); |
264 | cleanup: | 264 | cleanup: |
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index 7d13ce469..aa64144a8 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c | |||
@@ -323,7 +323,7 @@ main (int argc, char *const *argv) | |||
323 | ? 0 | 323 | ? 0 |
324 | : 1; | 324 | : 1; |
325 | GNUNET_free_nz ((void *) argv); | 325 | GNUNET_free_nz ((void *) argv); |
326 | GNUNET_free_non_null (pwfn); | 326 | GNUNET_free (pwfn); |
327 | return ret; | 327 | return ret; |
328 | } | 328 | } |
329 | 329 | ||
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c index 357453da7..5ed70807e 100644 --- a/src/util/gnunet-service-resolver.c +++ b/src/util/gnunet-service-resolver.c | |||
@@ -217,7 +217,7 @@ free_cache_entry (struct ResolveCache *rc) | |||
217 | GNUNET_free (pos->record); | 217 | GNUNET_free (pos->record); |
218 | GNUNET_free (pos); | 218 | GNUNET_free (pos); |
219 | } | 219 | } |
220 | GNUNET_free_non_null (rc->hostname); | 220 | GNUNET_free (rc->hostname); |
221 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc); | 221 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc); |
222 | cache_size--; | 222 | cache_size--; |
223 | GNUNET_free (rc); | 223 | GNUNET_free (rc); |
@@ -241,7 +241,7 @@ free_hosts_entry (struct ResolveCache *rc) | |||
241 | GNUNET_free (pos->record); | 241 | GNUNET_free (pos->record); |
242 | GNUNET_free (pos); | 242 | GNUNET_free (pos); |
243 | } | 243 | } |
244 | GNUNET_free_non_null (rc->hostname); | 244 | GNUNET_free (rc->hostname); |
245 | GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc); | 245 | GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc); |
246 | cache_size--; | 246 | cache_size--; |
247 | GNUNET_free (rc); | 247 | GNUNET_free (rc); |
@@ -267,7 +267,7 @@ free_active_lookup (struct ActiveLookup *al) | |||
267 | GNUNET_SCHEDULER_cancel (al->timeout_task); | 267 | GNUNET_SCHEDULER_cancel (al->timeout_task); |
268 | al->timeout_task = NULL; | 268 | al->timeout_task = NULL; |
269 | } | 269 | } |
270 | GNUNET_free_non_null (al->hostname); | 270 | GNUNET_free (al->hostname); |
271 | GNUNET_free (al); | 271 | GNUNET_free (al); |
272 | } | 272 | } |
273 | 273 | ||
@@ -1094,7 +1094,7 @@ handle_get (void *cls, const struct GNUNET_RESOLVER_GetMessage *msg) | |||
1094 | client_request_id, | 1094 | client_request_id, |
1095 | client); | 1095 | client); |
1096 | } | 1096 | } |
1097 | GNUNET_free_non_null (hostname); | 1097 | GNUNET_free (hostname); |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | 1100 | ||
@@ -1115,7 +1115,7 @@ shutdown_task (void *cls) | |||
1115 | while (NULL != hosts_head) | 1115 | while (NULL != hosts_head) |
1116 | free_hosts_entry (hosts_head); | 1116 | free_hosts_entry (hosts_head); |
1117 | GNUNET_DNSSTUB_stop (dnsstub_ctx); | 1117 | GNUNET_DNSSTUB_stop (dnsstub_ctx); |
1118 | GNUNET_free_non_null (my_domain); | 1118 | GNUNET_free (my_domain); |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | 1121 | ||
@@ -1296,7 +1296,7 @@ init_cb (void *cls, | |||
1296 | GNUNET_OK == result ? "success" : "failure"); | 1296 | GNUNET_OK == result ? "success" : "failure"); |
1297 | GNUNET_free (dns_servers[i]); | 1297 | GNUNET_free (dns_servers[i]); |
1298 | } | 1298 | } |
1299 | GNUNET_free_non_null (dns_servers); | 1299 | GNUNET_free (dns_servers); |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | 1302 | ||
diff --git a/src/util/mq.c b/src/util/mq.c index 78dc7dba2..302b310de 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -881,7 +881,7 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) | |||
881 | GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map); | 881 | GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map); |
882 | mq->assoc_map = NULL; | 882 | mq->assoc_map = NULL; |
883 | } | 883 | } |
884 | GNUNET_free_non_null (mq->handlers); | 884 | GNUNET_free (mq->handlers); |
885 | GNUNET_free (mq); | 885 | GNUNET_free (mq); |
886 | } | 886 | } |
887 | 887 | ||
diff --git a/src/util/network.c b/src/util/network.c index 223ce2080..b18030fcd 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -621,7 +621,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) | |||
621 | void | 621 | void |
622 | GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc) | 622 | GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc) |
623 | { | 623 | { |
624 | GNUNET_free_non_null (desc->addr); | 624 | GNUNET_free (desc->addr); |
625 | GNUNET_free (desc); | 625 | GNUNET_free (desc); |
626 | } | 626 | } |
627 | 627 | ||
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 714df6957..34b88d761 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -563,11 +563,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
563 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) | 563 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) |
564 | { | 564 | { |
565 | GNUNET_free (execpath); | 565 | GNUNET_free (execpath); |
566 | GNUNET_free_non_null (dirname); | 566 | GNUNET_free (dirname); |
567 | return tmp; | 567 | return tmp; |
568 | } | 568 | } |
569 | GNUNET_free (tmp); | 569 | GNUNET_free (tmp); |
570 | GNUNET_free_non_null (dirname); | 570 | GNUNET_free (dirname); |
571 | } | 571 | } |
572 | GNUNET_asprintf (&dirname, | 572 | GNUNET_asprintf (&dirname, |
573 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR, | 573 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR, |
@@ -643,11 +643,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
643 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) | 643 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) |
644 | { | 644 | { |
645 | GNUNET_free (execpath); | 645 | GNUNET_free (execpath); |
646 | GNUNET_free_non_null (dirname); | 646 | GNUNET_free (dirname); |
647 | return tmp; | 647 | return tmp; |
648 | } | 648 | } |
649 | GNUNET_free (tmp); | 649 | GNUNET_free (tmp); |
650 | GNUNET_free_non_null (dirname); | 650 | GNUNET_free (dirname); |
651 | } | 651 | } |
652 | GNUNET_asprintf (&dirname, | 652 | GNUNET_asprintf (&dirname, |
653 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR | 653 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR |
diff --git a/src/util/program.c b/src/util/program.c index 5ad069edd..8bda34b4f 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -342,10 +342,10 @@ GNUNET_PROGRAM_run2 (int argc, | |||
342 | ret = GNUNET_OK; | 342 | ret = GNUNET_OK; |
343 | cleanup: | 343 | cleanup: |
344 | GNUNET_CONFIGURATION_destroy (cfg); | 344 | GNUNET_CONFIGURATION_destroy (cfg); |
345 | GNUNET_free_non_null (cc.cfgfile); | 345 | GNUNET_free (cc.cfgfile); |
346 | GNUNET_free_non_null (cfg_fn); | 346 | GNUNET_free (cfg_fn); |
347 | GNUNET_free_non_null (loglev); | 347 | GNUNET_free (loglev); |
348 | GNUNET_free_non_null (logfile); | 348 | GNUNET_free (logfile); |
349 | return ret; | 349 | return ret; |
350 | } | 350 | } |
351 | 351 | ||
diff --git a/src/util/regex.c b/src/util/regex.c index d3ab35652..fed325cd6 100644 --- a/src/util/regex.c +++ b/src/util/regex.c | |||
@@ -174,10 +174,10 @@ num_to_regex (uint16_t value, | |||
174 | GNUNET_asprintf (&ret, | 174 | GNUNET_asprintf (&ret, |
175 | "%s%s%s%s", | 175 | "%s%s%s%s", |
176 | a, b, c, d); | 176 | a, b, c, d); |
177 | GNUNET_free_non_null (a); | 177 | GNUNET_free (a); |
178 | GNUNET_free_non_null (b); | 178 | GNUNET_free (b); |
179 | GNUNET_free_non_null (c); | 179 | GNUNET_free (c); |
180 | GNUNET_free_non_null (d); | 180 | GNUNET_free (d); |
181 | return ret; | 181 | return ret; |
182 | } | 182 | } |
183 | 183 | ||
@@ -607,7 +607,7 @@ address_to_regex (const void *addr, | |||
607 | reg = num_to_regex (a[i], m[i]); | 607 | reg = num_to_regex (a[i], m[i]); |
608 | if (NULL == reg) | 608 | if (NULL == reg) |
609 | { | 609 | { |
610 | GNUNET_free_non_null (ret); | 610 | GNUNET_free (ret); |
611 | return NULL; | 611 | return NULL; |
612 | } | 612 | } |
613 | if (NULL == ret) | 613 | if (NULL == ret) |
@@ -721,7 +721,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy) | |||
721 | line = ipv4_to_regex (&np[i]); | 721 | line = ipv4_to_regex (&np[i]); |
722 | if (NULL == line) | 722 | if (NULL == line) |
723 | { | 723 | { |
724 | GNUNET_free_non_null (reg); | 724 | GNUNET_free (reg); |
725 | GNUNET_free (np); | 725 | GNUNET_free (np); |
726 | return NULL; | 726 | return NULL; |
727 | } | 727 | } |
@@ -777,7 +777,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy) | |||
777 | line = ipv6_to_regex (&np[i]); | 777 | line = ipv6_to_regex (&np[i]); |
778 | if (NULL == line) | 778 | if (NULL == line) |
779 | { | 779 | { |
780 | GNUNET_free_non_null (reg); | 780 | GNUNET_free (reg); |
781 | GNUNET_free (np); | 781 | GNUNET_free (np); |
782 | return NULL; | 782 | return NULL; |
783 | } | 783 | } |
diff --git a/src/util/service.c b/src/util/service.c index ea078b19b..1b80c8d13 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1144,7 +1144,7 @@ get_server_addresses (const char *service_name, | |||
1144 | (EACCES == errno)) | 1144 | (EACCES == errno)) |
1145 | { | 1145 | { |
1146 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); | 1146 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); |
1147 | GNUNET_free_non_null (hostname); | 1147 | GNUNET_free (hostname); |
1148 | GNUNET_free (unixpath); | 1148 | GNUNET_free (unixpath); |
1149 | return GNUNET_SYSERR; | 1149 | return GNUNET_SYSERR; |
1150 | } | 1150 | } |
@@ -1170,7 +1170,7 @@ get_server_addresses (const char *service_name, | |||
1170 | _ ( | 1170 | _ ( |
1171 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 1171 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
1172 | service_name); | 1172 | service_name); |
1173 | GNUNET_free_non_null (hostname); | 1173 | GNUNET_free (hostname); |
1174 | return GNUNET_SYSERR; | 1174 | return GNUNET_SYSERR; |
1175 | } | 1175 | } |
1176 | if (0 == port) | 1176 | if (0 == port) |
@@ -1178,8 +1178,8 @@ get_server_addresses (const char *service_name, | |||
1178 | saddrs = GNUNET_new_array (2, struct sockaddr *); | 1178 | saddrs = GNUNET_new_array (2, struct sockaddr *); |
1179 | saddrlens = GNUNET_new_array (2, socklen_t); | 1179 | saddrlens = GNUNET_new_array (2, socklen_t); |
1180 | add_unixpath (saddrs, saddrlens, unixpath); | 1180 | add_unixpath (saddrs, saddrlens, unixpath); |
1181 | GNUNET_free_non_null (unixpath); | 1181 | GNUNET_free (unixpath); |
1182 | GNUNET_free_non_null (hostname); | 1182 | GNUNET_free (hostname); |
1183 | *addrs = saddrs; | 1183 | *addrs = saddrs; |
1184 | *addr_lens = saddrlens; | 1184 | *addr_lens = saddrlens; |
1185 | return 1; | 1185 | return 1; |
@@ -1203,7 +1203,7 @@ get_server_addresses (const char *service_name, | |||
1203 | hostname, | 1203 | hostname, |
1204 | gai_strerror (ret)); | 1204 | gai_strerror (ret)); |
1205 | GNUNET_free (hostname); | 1205 | GNUNET_free (hostname); |
1206 | GNUNET_free_non_null (unixpath); | 1206 | GNUNET_free (unixpath); |
1207 | return GNUNET_SYSERR; | 1207 | return GNUNET_SYSERR; |
1208 | } | 1208 | } |
1209 | next = res; | 1209 | next = res; |
@@ -1223,7 +1223,7 @@ get_server_addresses (const char *service_name, | |||
1223 | hostname); | 1223 | hostname); |
1224 | freeaddrinfo (res); | 1224 | freeaddrinfo (res); |
1225 | GNUNET_free (hostname); | 1225 | GNUNET_free (hostname); |
1226 | GNUNET_free_non_null (unixpath); | 1226 | GNUNET_free (unixpath); |
1227 | return GNUNET_SYSERR; | 1227 | return GNUNET_SYSERR; |
1228 | } | 1228 | } |
1229 | resi = i; | 1229 | resi = i; |
@@ -1330,7 +1330,7 @@ get_server_addresses (const char *service_name, | |||
1330 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 1330 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
1331 | } | 1331 | } |
1332 | } | 1332 | } |
1333 | GNUNET_free_non_null (unixpath); | 1333 | GNUNET_free (unixpath); |
1334 | *addrs = saddrs; | 1334 | *addrs = saddrs; |
1335 | *addr_lens = saddrlens; | 1335 | *addr_lens = saddrlens; |
1336 | return resi; | 1336 | return resi; |
@@ -1557,8 +1557,8 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) | |||
1557 | } | 1557 | } |
1558 | GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); | 1558 | GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); |
1559 | } | 1559 | } |
1560 | GNUNET_free_non_null (addrlens); | 1560 | GNUNET_free (addrlens); |
1561 | GNUNET_free_non_null (addrs); | 1561 | GNUNET_free (addrs); |
1562 | if ((0 != num) && (NULL == sh->slc_head)) | 1562 | if ((0 != num) && (NULL == sh->slc_head)) |
1563 | { | 1563 | { |
1564 | /* All attempts to bind failed, hard failure */ | 1564 | /* All attempts to bind failed, hard failure */ |
@@ -1566,7 +1566,7 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) | |||
1566 | GNUNET_ERROR_TYPE_ERROR, | 1566 | GNUNET_ERROR_TYPE_ERROR, |
1567 | _ ( | 1567 | _ ( |
1568 | "Could not bind to any of the ports I was supposed to, refusing to run!\n")); | 1568 | "Could not bind to any of the ports I was supposed to, refusing to run!\n")); |
1569 | GNUNET_free_non_null (csocks); | 1569 | GNUNET_free (csocks); |
1570 | return GNUNET_SYSERR; | 1570 | return GNUNET_SYSERR; |
1571 | } | 1571 | } |
1572 | } | 1572 | } |
@@ -1793,10 +1793,10 @@ teardown_service (struct GNUNET_SERVICE_Handle *sh) | |||
1793 | { | 1793 | { |
1794 | struct ServiceListenContext *slc; | 1794 | struct ServiceListenContext *slc; |
1795 | 1795 | ||
1796 | GNUNET_free_non_null (sh->v4_denied); | 1796 | GNUNET_free (sh->v4_denied); |
1797 | GNUNET_free_non_null (sh->v6_denied); | 1797 | GNUNET_free (sh->v6_denied); |
1798 | GNUNET_free_non_null (sh->v4_allowed); | 1798 | GNUNET_free (sh->v4_allowed); |
1799 | GNUNET_free_non_null (sh->v6_allowed); | 1799 | GNUNET_free (sh->v6_allowed); |
1800 | while (NULL != (slc = sh->slc_head)) | 1800 | while (NULL != (slc = sh->slc_head)) |
1801 | { | 1801 | { |
1802 | GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc); | 1802 | GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc); |
@@ -1890,7 +1890,7 @@ GNUNET_SERVICE_start (const char *service_name, | |||
1890 | sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); | 1890 | sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); |
1891 | if (GNUNET_OK != setup_service (sh)) | 1891 | if (GNUNET_OK != setup_service (sh)) |
1892 | { | 1892 | { |
1893 | GNUNET_free_non_null (sh->handlers); | 1893 | GNUNET_free (sh->handlers); |
1894 | GNUNET_free (sh); | 1894 | GNUNET_free (sh); |
1895 | return NULL; | 1895 | return NULL; |
1896 | } | 1896 | } |
@@ -1913,7 +1913,7 @@ GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Handle *srv) | |||
1913 | while (NULL != (client = srv->clients_head)) | 1913 | while (NULL != (client = srv->clients_head)) |
1914 | GNUNET_SERVICE_client_drop (client); | 1914 | GNUNET_SERVICE_client_drop (client); |
1915 | teardown_service (srv); | 1915 | teardown_service (srv); |
1916 | GNUNET_free_non_null (srv->handlers); | 1916 | GNUNET_free (srv->handlers); |
1917 | GNUNET_free (srv); | 1917 | GNUNET_free (srv); |
1918 | } | 1918 | } |
1919 | 1919 | ||
@@ -2159,13 +2159,13 @@ shutdown: | |||
2159 | } | 2159 | } |
2160 | #endif | 2160 | #endif |
2161 | teardown_service (&sh); | 2161 | teardown_service (&sh); |
2162 | GNUNET_free_non_null (sh.handlers); | 2162 | GNUNET_free (sh.handlers); |
2163 | GNUNET_SPEEDUP_stop_ (); | 2163 | GNUNET_SPEEDUP_stop_ (); |
2164 | GNUNET_CONFIGURATION_destroy (cfg); | 2164 | GNUNET_CONFIGURATION_destroy (cfg); |
2165 | GNUNET_free_non_null (logfile); | 2165 | GNUNET_free (logfile); |
2166 | GNUNET_free_non_null (loglev); | 2166 | GNUNET_free (loglev); |
2167 | GNUNET_free (cfg_filename); | 2167 | GNUNET_free (cfg_filename); |
2168 | GNUNET_free_non_null (opt_cfg_filename); | 2168 | GNUNET_free (opt_cfg_filename); |
2169 | 2169 | ||
2170 | return err ? GNUNET_SYSERR : sh.ret; | 2170 | return err ? GNUNET_SYSERR : sh.ret; |
2171 | } | 2171 | } |
diff --git a/src/util/socks.c b/src/util/socks.c index 756be753a..7ab297272 100644 --- a/src/util/socks.c +++ b/src/util/socks.c | |||
@@ -665,7 +665,7 @@ GNUNET_SOCKS_do_connect (const char *service_name, | |||
665 | (host0 != NULL) ? host0 | 665 | (host0 != NULL) ? host0 |
666 | : "127.0.0.1", | 666 | : "127.0.0.1", |
667 | port0); | 667 | port0); |
668 | GNUNET_free_non_null (host0); | 668 | GNUNET_free (host0); |
669 | 669 | ||
670 | /* Sets to NULL if they do not exist */ | 670 | /* Sets to NULL if they do not exist */ |
671 | (void) GNUNET_CONFIGURATION_get_value_string (cfg, | 671 | (void) GNUNET_CONFIGURATION_get_value_string (cfg, |
@@ -677,8 +677,8 @@ GNUNET_SOCKS_do_connect (const char *service_name, | |||
677 | "SOCKSPASS", | 677 | "SOCKSPASS", |
678 | &pass); | 678 | &pass); |
679 | ih = GNUNET_SOCKS_init_handshake (user, pass); | 679 | ih = GNUNET_SOCKS_init_handshake (user, pass); |
680 | GNUNET_free_non_null (user); | 680 | GNUNET_free (user); |
681 | GNUNET_free_non_null (pass); | 681 | GNUNET_free (pass); |
682 | 682 | ||
683 | GNUNET_SOCKS_set_handshake_destination (ih, host1, port1); | 683 | GNUNET_SOCKS_set_handshake_destination (ih, host1, port1); |
684 | GNUNET_free (host1); | 684 | GNUNET_free (host1); |
diff --git a/src/util/strings.c b/src/util/strings.c index 9510b3b3b..5148d0368 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -1148,7 +1148,7 @@ GNUNET_STRINGS_path_is_absolute (const char *filename, | |||
1148 | if (r_uri_scheme) | 1148 | if (r_uri_scheme) |
1149 | *r_uri_scheme = uri; | 1149 | *r_uri_scheme = uri; |
1150 | else | 1150 | else |
1151 | GNUNET_free_non_null (uri); | 1151 | GNUNET_free (uri); |
1152 | 1152 | ||
1153 | return GNUNET_STRINGS_path_is_absolute (post_scheme_path, | 1153 | return GNUNET_STRINGS_path_is_absolute (post_scheme_path, |
1154 | GNUNET_NO, | 1154 | GNUNET_NO, |
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c index a24af7124..da3d2f470 100644 --- a/src/util/test_common_allocation.c +++ b/src/util/test_common_allocation.c | |||
@@ -55,9 +55,9 @@ check (void) | |||
55 | GNUNET_free (ptrs[i]); | 55 | GNUNET_free (ptrs[i]); |
56 | } | 56 | } |
57 | 57 | ||
58 | /* GNUNET_free_non_null test */ | 58 | /* GNUNET_free test */ |
59 | GNUNET_free_non_null (NULL); | 59 | GNUNET_free (NULL); |
60 | GNUNET_free_non_null (GNUNET_malloc (4)); | 60 | GNUNET_free (GNUNET_malloc (4)); |
61 | 61 | ||
62 | /* GNUNET_strdup tests */ | 62 | /* GNUNET_strdup tests */ |
63 | ptrs[0] = GNUNET_strdup ("bar"); | 63 | ptrs[0] = GNUNET_strdup ("bar"); |
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 6227a28db..59b1b2291 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c | |||
@@ -128,7 +128,7 @@ diffsCallBack (void *cls, const char *section, const char *option, | |||
128 | } | 128 | } |
129 | else | 129 | else |
130 | cbData->status = 1; | 130 | cbData->status = 1; |
131 | GNUNET_free_non_null (diffValue); | 131 | GNUNET_free (diffValue); |
132 | break; | 132 | break; |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/src/util/test_container_meta_data.c b/src/util/test_container_meta_data.c index d768f3699..db413f313 100644 --- a/src/util/test_container_meta_data.c +++ b/src/util/test_container_meta_data.c | |||
@@ -113,7 +113,7 @@ testMeta (int i) | |||
113 | GNUNET_CONTAINER_meta_data_serialize (m, &sval, size, | 113 | GNUNET_CONTAINER_meta_data_serialize (m, &sval, size, |
114 | GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL)) | 114 | GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL)) |
115 | { | 115 | { |
116 | GNUNET_free_non_null (sval); | 116 | GNUNET_free (sval); |
117 | ABORT (m); | 117 | ABORT (m); |
118 | } | 118 | } |
119 | GNUNET_CONTAINER_meta_data_destroy (m); | 119 | GNUNET_CONTAINER_meta_data_destroy (m); |
diff --git a/src/util/test_crypto_symmetric.c b/src/util/test_crypto_symmetric.c index 9f6cd5ed0..5012c7f5b 100644 --- a/src/util/test_crypto_symmetric.c +++ b/src/util/test_crypto_symmetric.c | |||
@@ -147,7 +147,7 @@ verifyCrypto () | |||
147 | ret = 1; | 147 | ret = 1; |
148 | } | 148 | } |
149 | error: | 149 | error: |
150 | GNUNET_free_non_null (res); | 150 | GNUNET_free (res); |
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | 153 | ||
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 13fda53bf..05716741e 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -215,7 +215,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
215 | own_fqdn = GNUNET_RESOLVER_local_fqdn_get (); | 215 | own_fqdn = GNUNET_RESOLVER_local_fqdn_get (); |
216 | /* can't really check, only thing we can safely | 216 | /* can't really check, only thing we can safely |
217 | compare against is our own identical logic... */ | 217 | compare against is our own identical logic... */ |
218 | GNUNET_free_non_null (own_fqdn); | 218 | GNUNET_free (own_fqdn); |
219 | 219 | ||
220 | /* | 220 | /* |
221 | * Testing non-local DNS resolution | 221 | * Testing non-local DNS resolution |