CVS update: php3/functions

From: Date: Fri, 18 Jun 1999 16:18:23 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-7098@lists.php.net to get a copy of this message
Date: Friday June 18, 1999 @ 12:18 Author: sas Update of /repository/php3/functions In directory php:/tmp/cvs-serv4549/functions Modified Files: fsock.c Log Message: return at maximum one less characters than maximum Index: php3/functions/fsock.c diff -u php3/functions/fsock.c:1.121 php3/functions/fsock.c:1.122 --- php3/functions/fsock.c:1.121 Fri Jun 18 09:04:06 1999 +++ php3/functions/fsock.c Fri Jun 18 12:18:21 1999 @@ -27,7 +27,7 @@ | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.121 1999/06/18 13:04:06 sas Exp $ */ +/* $Id: fsock.c,v 1.122 1999/06/18 16:18:21 sas Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -597,8 +597,10 @@ if(p) { amount = (ptrdiff_t) p - (ptrdiff_t) READPTR(sock) + 1; } else { - amount = MIN(TOREAD(sock), maxlen - 1); + amount = TOREAD(sock); } + + amount = MIN(amount, maxlen - 1); if(amount > 0) { memcpy(buf, READPTR(sock), amount);

« previous php.dev (#7098) next »