aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/nano-vfprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/nano-vfprintf.c')
-rw-r--r--newlib/libc/stdio/nano-vfprintf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/stdio/nano-vfprintf.c b/newlib/libc/stdio/nano-vfprintf.c
index 838804e..0d42a94 100644
--- a/newlib/libc/stdio/nano-vfprintf.c
+++ b/newlib/libc/stdio/nano-vfprintf.c
@@ -201,7 +201,7 @@ __ssputs_r (struct _reent *ptr,
str = (unsigned char *)_malloc_r (ptr, newsize);
if (!str)
{
- ptr->_errno = ENOMEM;
+ _REENT_ERRNO(ptr) = ENOMEM;
goto err;
}
memcpy (str, fp->_bf._base, curpos);
@@ -215,7 +215,7 @@ __ssputs_r (struct _reent *ptr,
/* Free unneeded buffer. */
_free_r (ptr, fp->_bf._base);
/* Ensure correct errno, even if free changed it. */
- ptr->_errno = ENOMEM;
+ _REENT_ERRNO(ptr) = ENOMEM;
goto err;
}
}
@@ -291,7 +291,7 @@ __ssprint_r (struct _reent *ptr,
str = (unsigned char *)_malloc_r (ptr, newsize);
if (!str)
{
- ptr->_errno = ENOMEM;
+ _REENT_ERRNO(ptr) = ENOMEM;
goto err;
}
memcpy (str, fp->_bf._base, curpos);
@@ -306,7 +306,7 @@ __ssprint_r (struct _reent *ptr,
/* Free unneeded buffer. */
_free_r (ptr, fp->_bf._base);
/* Ensure correct errno, even if free changed it. */
- ptr->_errno = ENOMEM;
+ _REENT_ERRNO(ptr) = ENOMEM;
goto err;
}
}
@@ -501,7 +501,7 @@ _VFPRINTF_R (struct _reent *data,
fp->_bf._base = fp->_p = _malloc_r (data, 64);
if (!fp->_p)
{
- data->_errno = ENOMEM;
+ _REENT_ERRNO(data) = ENOMEM;
return EOF;
}
fp->_bf._size = 64;