aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/snprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/snprintf.c')
-rw-r--r--newlib/libc/stdio/snprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c
index 50d7ddd..4a3084b 100644
--- a/newlib/libc/stdio/snprintf.c
+++ b/newlib/libc/stdio/snprintf.c
@@ -37,7 +37,7 @@ _snprintf_r (struct _reent *ptr,
if (size > INT_MAX)
{
- ptr->_errno = EOVERFLOW;
+ _REENT_ERRNO(ptr) = EOVERFLOW;
return EOF;
}
f._flags = __SWR | __SSTR;
@@ -48,7 +48,7 @@ _snprintf_r (struct _reent *ptr,
ret = _svfprintf_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);
@@ -74,7 +74,7 @@ snprintf (char *__restrict str,
if (size > INT_MAX)
{
- ptr->_errno = EOVERFLOW;
+ _REENT_ERRNO(ptr) = EOVERFLOW;
return EOF;
}
f._flags = __SWR | __SSTR;
@@ -85,7 +85,7 @@ snprintf (char *__restrict str,
ret = _svfprintf_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);