summaryrefslogtreecommitdiff
path: root/main/php_sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_sprintf.c')
-rw-r--r--main/php_sprintf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/main/php_sprintf.c b/main/php_sprintf.c
index 6739c74c8c..b3f6b300e6 100644
--- a/main/php_sprintf.c
+++ b/main/php_sprintf.c
@@ -37,9 +37,7 @@ php_sprintf (char*s, const char* format, ...)
s[0] = '\0';
ret = vsprintf (s, format, args);
va_end (args);
- if (!ret)
- return -1;
- return strlen (s);
+ return (ret < 0) ? -1 : ret;
}
/*