aboutsummaryrefslogtreecommitdiff
path: root/src/util/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/bio.c')
-rw-r--r--src/util/bio.c16
1 files changed, 8 insertions, 8 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);