svn: /pecl/mysqlnd_ms/trunk/ mysqlnd_ms.c

From: Date: Tue, 06 Dec 2011 18:56:43 +0000
Subject: svn: /pecl/mysqlnd_ms/trunk/ mysqlnd_ms.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-17276@lists.php.net to get a copy of this message
uw Tue, 06 Dec 2011 18:56:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=320518 Log: Removing dead code. new_global_trx is always new, freshly allocated immediately before the function call unless new_global_trx == orig_global_trx. In the latter case the function returns before changing new_global_trx. No need to free anything before using. Changed paths: U pecl/mysqlnd_ms/trunk/mysqlnd_ms.c Modified: pecl/mysqlnd_ms/trunk/mysqlnd_ms.c =================================================================== --- pecl/mysqlnd_ms/trunk/mysqlnd_ms.c 2011-12-06 18:45:45 UTC (rev 320517) +++ pecl/mysqlnd_ms/trunk/mysqlnd_ms.c 2011-12-06 18:56:43 UTC (rev 320518) @@ -256,12 +256,6 @@ DBG_VOID_RETURN; } - if (new_global_trx->on_commit) { - mnd_pefree(new_global_trx->on_commit, persistent); - new_global_trx->on_commit = NULL; - new_global_trx->on_commit_len = 0; - } - if (TRUE == is_master) { new_global_trx->on_commit_len = orig_global_trx->on_commit_len; new_global_trx->on_commit = (orig_global_trx->on_commit) ? @@ -271,20 +265,10 @@ new_global_trx->on_commit = NULL; } - if (new_global_trx->fetch_last_gtid) { - mnd_pefree(new_global_trx->fetch_last_gtid, persistent); - new_global_trx->fetch_last_gtid = NULL; - new_global_trx->fetch_last_gtid_len = 0; - } new_global_trx->fetch_last_gtid_len = orig_global_trx->fetch_last_gtid_len; new_global_trx->fetch_last_gtid = (orig_global_trx->fetch_last_gtid) ? mnd_pestrndup(orig_global_trx->fetch_last_gtid, orig_global_trx->fetch_last_gtid_len, persistent) : NULL; - if (new_global_trx->check_for_gtid) { - mnd_pefree(new_global_trx->check_for_gtid, persistent); - new_global_trx->check_for_gtid = NULL; - new_global_trx->check_for_gtid_len = 0; - } new_global_trx->check_for_gtid_len = orig_global_trx->check_for_gtid_len; new_global_trx->check_for_gtid = (orig_global_trx->check_for_gtid) ? mnd_pestrndup(orig_global_trx->check_for_gtid, orig_global_trx->check_for_gtid_len, persistent) : NULL;

« previous php.pecl.cvs (#17276) next »