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/configuration.c | |
parent | 1437556645417e6302862845e7ebcbd4c9908357 (diff) | |
download | gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip |
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/util/configuration.c')
-rw-r--r-- | src/util/configuration.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; |