summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/stdio/asprintf.c2
-rw-r--r--newlib/libc/stdio/sprintf.c2
-rw-r--r--newlib/libc/stdio/vasprintf.c2
-rw-r--r--newlib/libc/stdio/vsprintf.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libc/stdio/asprintf.c b/newlib/libc/stdio/asprintf.c
index d36781548..85bdd313b 100644
--- a/newlib/libc/stdio/asprintf.c
+++ b/newlib/libc/stdio/asprintf.c
@@ -47,6 +47,7 @@ _asprintf_r (ptr, strp, fmt, va_alist)
f._bf._base = f._p = NULL;
f._bf._size = f._w = 0;
f._data = ptr;
+ f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
@@ -80,6 +81,7 @@ asprintf (strp, fmt, va_alist)
f._bf._base = f._p = NULL;
f._bf._size = f._w = 0;
f._data = _REENT;
+ f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c
index 879b480c9..8582272d7 100644
--- a/newlib/libc/stdio/sprintf.c
+++ b/newlib/libc/stdio/sprintf.c
@@ -325,6 +325,7 @@ _sprintf_r (ptr, str, fmt, va_alist)
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = INT_MAX;
f._data = ptr;
+ f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
@@ -356,6 +357,7 @@ sprintf (str, fmt, va_alist)
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = INT_MAX;
f._data = _REENT;
+ f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c
index 7f35752c7..fbfedee00 100644
--- a/newlib/libc/stdio/vasprintf.c
+++ b/newlib/libc/stdio/vasprintf.c
@@ -46,6 +46,7 @@ _DEFUN (vasprintf, (strp, fmt, ap),
f._bf._base = f._p = NULL;
f._bf._size = f._w = 0;
f._data = _REENT;
+ f._file = -1; /* No file. */
ret = vfprintf (&f, fmt, ap);
*f._p = 0;
*strp = f._bf._base;
@@ -66,6 +67,7 @@ _DEFUN (_vasprintf_r, (ptr, strp, fmt, ap),
f._bf._base = f._p = NULL;
f._bf._size = f._w = 0;
f._data = ptr;
+ f._file = -1; /* No file. */
ret = _vfprintf_r (ptr, &f, fmt, ap);
*f._p = 0;
*strp = f._bf._base;
diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c
index b440ac506..3b92f2676 100644
--- a/newlib/libc/stdio/vsprintf.c
+++ b/newlib/libc/stdio/vsprintf.c
@@ -44,6 +44,7 @@ _DEFUN (vsprintf, (str, fmt, ap),
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = INT_MAX;
f._data = _REENT;
+ f._file = -1; /* No file. */
ret = vfprintf (&f, fmt, ap);
*f._p = 0;
return ret;
@@ -63,6 +64,7 @@ _DEFUN (_vsprintf_r, (ptr, str, fmt, ap),
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = INT_MAX;
f._data = ptr;
+ f._file = -1; /* No file. */
ret = _vfprintf_r (ptr, &f, fmt, ap);
*f._p = 0;
return ret;