about summary refs log tree commit diff
path: root/libio/vasprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/vasprintf.c')
-rw-r--r--libio/vasprintf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libio/vasprintf.c b/libio/vasprintf.c
index f8dba80c38..02289407f4 100644
--- a/libio/vasprintf.c
+++ b/libio/vasprintf.c
@@ -42,7 +42,7 @@ _IO_vasprintf (result_ptr, format, args)
   _IO_lock_t lock;
 #endif
   int ret;
-  string = ALLOC_BUF(init_string_size);
+  string = malloc (init_string_size);
   if (string == NULL)
     return -1;
 #ifdef _IO_MTSAFE_IO
@@ -52,13 +52,14 @@ _IO_vasprintf (result_ptr, format, args)
   _IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
   _IO_str_init_static ((_IO_FILE*)&sf, string, init_string_size, string);
   sf._sbf._f._flags &= ~_IO_USER_BUF;
-  sf._s._allocate_buffer = (_IO_alloc_type)malloc;
-  sf._s._free_buffer = (_IO_free_type)free;
+  sf._s._allocate_buffer = (_IO_alloc_type) malloc;
+  sf._s._free_buffer = (_IO_free_type) free;
   ret = _IO_vfprintf((_IO_FILE*)&sf, format, args);
   if (ret < 0)
     return ret;
-  *result_ptr = (char*)realloc(sf._sbf._f._IO_buf_base,
-			       (sf._sbf._f._IO_write_ptr - sf._sbf._f._IO_write_base) +1);
+  *result_ptr = (char *) realloc (sf._sbf._f._IO_buf_base,
+				  (sf._sbf._f._IO_write_ptr
+				   - sf._sbf._f._IO_write_base) +1);
   if (*result_ptr == NULL)
     *result_ptr = sf._sbf._f._IO_buf_base;
   (*result_ptr)[sf._sbf._f._IO_write_ptr-sf._sbf._f._IO_write_base] = '\0';