cvs: php-src(PHP_5_3) /main php_sprintf.c
| From: | Dmitry Stogov | Date: | Thu, 14 May 2009 08:21:54 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /main php_sprintf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57799@lists.php.net to get a copy of this message | ||
dmitry Thu May 14 08:21:54 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/main php_sprintf.c
Log:
Fixed wrong return value
http://cvs.php.net/viewvc.cgi/php-src/main/php_sprintf.c?r1=1.23.2.1.2.1.2.2&r2=1.23.2.1.2.1.2.3&diff_format=u
Index: php-src/main/php_sprintf.c
diff -u php-src/main/php_sprintf.c:1.23.2.1.2.1.2.2 php-src/main/php_sprintf.c:1.23.2.1.2.1.2.3
--- php-src/main/php_sprintf.c:1.23.2.1.2.1.2.2 Wed Dec 31 11:15:47 2008
+++ php-src/main/php_sprintf.c Thu May 14 08:21:54 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sprintf.c,v 1.23.2.1.2.1.2.2 2008/12/31 11:15:47 sebastian Exp $ */
+/* $Id: php_sprintf.c,v 1.23.2.1.2.1.2.3 2009/05/14 08:21:54 dmitry Exp $ */
#include <stdio.h>
#include <stdarg.h>
@@ -37,9 +37,7 @@
s[0] = '\0';
ret = vsprintf (s, format, args);
va_end (args);
- if (!ret)
- return -1;
- return strlen (s);
+ return (ret < 0) ? -1 : ret;
}
/*