summaryrefslogtreecommitdiff
path: root/StdLib/LibC/Stdio/vsnprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/LibC/Stdio/vsnprintf.c')
-rw-r--r--StdLib/LibC/Stdio/vsnprintf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/StdLib/LibC/Stdio/vsnprintf.c b/StdLib/LibC/Stdio/vsnprintf.c
index b2a2f63a91..23385ba0d8 100644
--- a/StdLib/LibC/Stdio/vsnprintf.c
+++ b/StdLib/LibC/Stdio/vsnprintf.c
@@ -54,11 +54,7 @@ __weak_alias(vsnprintf,_vsnprintf)
#endif
int
-vsnprintf(str, n, fmt, ap)
- char *str;
- size_t n;
- const char *fmt;
- _BSD_VA_LIST_ ap;
+vsnprintf(char *str, size_t n, const char *fmt, _BSD_VA_LIST_ ap)
{
int ret;
FILE f;
@@ -81,7 +77,7 @@ vsnprintf(str, n, fmt, ap)
f._bf._size = f._w = 0;
} else {
f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._w = n - 1;
+ f._bf._size = f._w = (int)(n - 1);
}
ret = __vfprintf_unlocked(&f, fmt, ap);
*f._p = 0;