dmitry Fri Apr 7 12:39:43 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/sapi/cgi cgi_main.c
Log:
Removed unnecessary copying
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.11&r2=1.267.2.12&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.11
php-src/sapi/cgi/cgi_main.c:1.267.2.12
--- php-src/sapi/cgi/cgi_main.c:1.267.2.11 Thu Mar 23 10:19:30 2006
+++ php-src/sapi/cgi/cgi_main.c Fri Apr 7 12:39:43 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.267.2.11 2006/03/23 10:19:30 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.12 2006/04/07 12:39:43 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -433,7 +433,7 @@
{
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *) SG(server_context);
- char **env, *p, *t;
+ char **env, *p;
int magic_quotes_gpc = PG(magic_quotes_gpc);
/* turn off magic_quotes while importing environment variables
*/
@@ -443,9 +443,9 @@
if (!p) { /* malformed
entry? */
continue;
}
- t = estrndup(*env, p - *env);
- php_register_variable(t, p + 1, array_ptr TSRMLS_CC);
- efree(t);
+ *p = 0;
+ php_register_variable(*env, p + 1, array_ptr TSRMLS_CC);
+ *p = '=';
}
PG(magic_quotes_gpc) = magic_quotes_gpc;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php