Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14284 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86509 invoked by uid 1010); 5 Jan 2005 06:43:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86489 invoked from network); 5 Jan 2005 06:43:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2005 06:43:10 -0000 X-Host-Fingerprint: 66.111.4.26 out2.smtp.messagingengine.com Received: from ([66.111.4.26:43269] helo=out2.smtp.messagingengine.com) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id DD/50-25400-D7C8BD14 for ; Wed, 05 Jan 2005 01:43:09 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id 37670C495B3; Wed, 5 Jan 2005 01:43:07 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id 5F54182B; Wed, 5 Jan 2005 01:43:06 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) Cc: internals@lists.php.net References: <1104826024.21222.211948578@webmail.messagingengine.com> In-Reply-To: To: "Derick Rethans" Date: Tue, 04 Jan 2005 22:43:06 -0800 X-Sasl-Enc: TrVdPnWDSsIsnT2KGnp7kw 1104907386 Message-ID: <1104907386.28472.212029562@webmail.messagingengine.com> Subject: Re: vsprintf returns int not char* From: kameshj@fastmail.fm ("Kamesh Jayachandran") 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" 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