cvs: php-src(PHP_5_2) /main/streams memory.c
| From: | Marcus Boerger | Date: | Thu, 22 Feb 2007 23:26:03 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /main/streams memory.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-43216@lists.php.net to get a copy of this message | ||
helly Thu Feb 22 23:26:03 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main/streams memory.c
Log:
- MFH Fix logic
http://cvs.php.net/viewvc.cgi/php-src/main/streams/memory.c?r1=1.8.2.6.2.16&r2=1.8.2.6.2.17&diff_format=u
Index: php-src/main/streams/memory.c
diff -u php-src/main/streams/memory.c:1.8.2.6.2.16 php-src/main/streams/memory.c:1.8.2.6.2.17
--- php-src/main/streams/memory.c:1.8.2.6.2.16 Wed Feb 7 20:59:59 2007
+++ php-src/main/streams/memory.c Thu Feb 22 23:26:03 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: memory.c,v 1.8.2.6.2.16 2007/02/07 20:59:59 helly Exp $ */
+/* $Id: memory.c,v 1.8.2.6.2.17 2007/02/22 23:26:03 helly Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -260,14 +260,14 @@
if (newsize <= ms->fsize) {
if (newsize < ms->fpos) {
ms->fpos = newsize;
- } else {
- ms->data = erealloc(ms->data, newsize);
- memset(ms->data+ms->fsize, 0, newsize - ms->fsize);
- ms->fsize = newsize;
}
+ } else {
+ ms->data = erealloc(ms->data, newsize);
+ memset(ms->data+ms->fsize, 0, newsize - ms->fsize);
ms->fsize = newsize;
- return PHP_STREAM_OPTION_RETURN_OK;
}
+ ms->fsize = newsize;
+ return PHP_STREAM_OPTION_RETURN_OK;
}
default:
return PHP_STREAM_OPTION_RETURN_NOTIMPL;