cvs: php-src(PHP_5_2) /main php_sprintf.c

From: Date: Thu, 14 May 2009 08:21:38 +0000
Subject: cvs: php-src(PHP_5_2) /main php_sprintf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-57798@lists.php.net to get a copy of this message
dmitry Thu May 14 08:21:38 2009 UTC Modified files: (Branch: PHP_5_2) /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.3&r2=1.23.2.1.2.4&diff_format=u Index: php-src/main/php_sprintf.c diff -u php-src/main/php_sprintf.c:1.23.2.1.2.3 php-src/main/php_sprintf.c:1.23.2.1.2.4 --- php-src/main/php_sprintf.c:1.23.2.1.2.3 Wed Dec 31 11:17:47 2008 +++ php-src/main/php_sprintf.c Thu May 14 08:21:38 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sprintf.c,v 1.23.2.1.2.3 2008/12/31 11:17:47 sebastian Exp $ */ +/* $Id: php_sprintf.c,v 1.23.2.1.2.4 2009/05/14 08:21:38 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; } /*

« previous php.cvs (#57798) next »