Re: vsprintf returns int not char*

From: Date: Wed, 05 Jan 2005 06:43:06 +0000
Subject: Re: vsprintf returns int not char*
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-14284@lists.php.net to get a copy of this message
Hi Derick, Sorry I have seen this PHP-5.0.3 bundle. The change is there on December 17 commit on PHP5_0. Still I feel this should be replaced if (!ret) return -1; by if (ret<0) return -1; As the document for vsprintf states as follows, If an output error is encountered, a negative value is returned. With regards Kamesh Jayachandran On Tue, 4 Jan 2005 14:44:56 +0100 (CET), "Derick Rethans" <derick@php.net> said: > On Tue, 4 Jan 2005, Kamesh Jayachandran wrote: > > > Hi Derick, > > in php-src/main/php_sprintf.c > > PHPAPI int > > php_sprintf (char*s, const char* format, ...) > > { > > va_list args; > > char *ret; //ret should be of type integer as vsprintf returns int rather than char* > > It is already an int, please update your source trees. > > Derick > > -- > Derick Rethans > http://derickrethans.nl | > http://ez.no | http://xdebug.org

« previous php.internals (#14284) next »