From dda00318d912685555864d45236dabf3622b924b Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Sat, 13 Dec 2008 15:06:20 +0000 Subject: [PATCH] One len variable is enough here, we can reuse it --- ext/standard/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/standard/file.c b/ext/standard/file.c index 4bddd0d194..8bf018c077 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -521,7 +521,7 @@ PHP_FUNCTION(file_get_contents) char *contents; zend_bool use_include_path = 0; php_stream *stream; - int len, newlen; + int len; long offset = -1; long maxlen = PHP_STREAM_COPY_ALL; zval *zcontext = NULL; @@ -556,8 +556,7 @@ PHP_FUNCTION(file_get_contents) if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) { if (PG(magic_quotes_runtime)) { - contents = php_addslashes(contents, len, &newlen, 1 TSRMLS_CC); /* 1 = free source string */ - len = newlen; + contents = php_addslashes(contents, len, &len, 1 TSRMLS_CC); /* 1 = free source string */ } RETVAL_STRINGL(contents, len, 0); -- 2.50.1