aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/sniprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/sniprintf.c')
-rw-r--r--newlib/libc/stdio/sniprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/stdio/sniprintf.c b/newlib/libc/stdio/sniprintf.c
index 375a397..b05ffcb 100644
--- a/newlib/libc/stdio/sniprintf.c
+++ b/newlib/libc/stdio/sniprintf.c
@@ -38,7 +38,7 @@ _sniprintf_r (struct _reent *ptr,
if (size > INT_MAX)
{
- ptr->_errno = EOVERFLOW;
+ _REENT_ERRNO(ptr) = EOVERFLOW;
return EOF;
}
f._flags = __SWR | __SSTR;
@@ -49,7 +49,7 @@ _sniprintf_r (struct _reent *ptr,
ret = _svfiprintf_r (ptr, &f, fmt, ap);
va_end (ap);
if (ret < EOF)
- ptr->_errno = EOVERFLOW;
+ _REENT_ERRNO(ptr) = EOVERFLOW;
if (size > 0)
*f._p = 0;
return (ret);
@@ -69,7 +69,7 @@ sniprintf (char *str,
if (size > INT_MAX)
{
- ptr->_errno = EOVERFLOW;
+ _REENT_ERRNO(ptr) = EOVERFLOW;
return EOF;
}
f._flags = __SWR | __SSTR;
@@ -80,7 +80,7 @@ sniprintf (char *str,
ret = _svfiprintf_r (ptr, &f, fmt, ap);
va_end (ap);
if (ret < EOF)
- ptr->_errno = EOVERFLOW;
+ _REENT_ERRNO(ptr) = EOVERFLOW;
if (size > 0)
*f._p = 0;
return (ret);