about summary refs log tree commit diff
path: root/src/stdio/vsnprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/vsnprintf.c')
-rw-r--r--src/stdio/vsnprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdio/vsnprintf.c b/src/stdio/vsnprintf.c
index 5d3f0c5f..1f316ca4 100644
--- a/src/stdio/vsnprintf.c
+++ b/src/stdio/vsnprintf.c
@@ -23,8 +23,8 @@ int vsnprintf(char *s, size_t n, const char *fmt, va_list ap)
 		return -1;
 	} else if (n > 0) {
 		if (n > (char *)0+SIZE_MAX-s) n = (char *)0+SIZE_MAX-s;
-		f.wpos = s;
-		f.wbase = f.wend = s+n-1;
+		f.wpos = (void *)s;
+		f.wbase = f.wend = (void *)(s+n-1);
 		f.wstop = f.wend - 1;
 	}
 	r = vfprintf(&f, fmt, ap);