summaryrefslogtreecommitdiff
path: root/main/snprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/snprintf.c')
-rw-r--r--main/snprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/snprintf.c b/main/snprintf.c
index b9f781346c..0b9182b614 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -1241,14 +1241,14 @@ static void strx_printv(int *ccp, char *buf, size_t len, const char *format, va_
PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ */
{
- unsigned int cc;
+ int cc;
va_list ap;
va_start(ap, format);
strx_printv(&cc, buf, len, format, ap);
va_end(ap);
if (cc >= len) {
- cc = len -1;
+ cc = (int)len -1;
buf[cc] = '\0';
}
return cc;
@@ -1257,11 +1257,11 @@ PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{
PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */
{
- unsigned int cc;
+ int cc;
strx_printv(&cc, buf, len, format, ap);
if (cc >= len) {
- cc = len -1;
+ cc = (int)len -1;
buf[cc] = '\0';
}
return cc;