summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_palloc.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-01-23 19:09:33 +0000
committerAndrey Hristov <andrey@php.net>2008-01-23 19:09:33 +0000
commit69f4a40d99b09a0826d5a23bf0e2f30ecec12950 (patch)
tree49019d5ed2cb218d0f479ebd0cc02c26e16804fd /ext/mysqlnd/mysqlnd_palloc.c
parentb9dcdd409d3d217c0533667d48b7eb55f6e6018d (diff)
downloadphp-git-69f4a40d99b09a0826d5a23bf0e2f30ecec12950.tar.gz
Merge with internal version
Diffstat (limited to 'ext/mysqlnd/mysqlnd_palloc.c')
-rw-r--r--ext/mysqlnd/mysqlnd_palloc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/ext/mysqlnd/mysqlnd_palloc.c b/ext/mysqlnd/mysqlnd_palloc.c
index 2aeb0b3d73..976e473733 100644
--- a/ext/mysqlnd/mysqlnd_palloc.c
+++ b/ext/mysqlnd/mysqlnd_palloc.c
@@ -294,9 +294,11 @@ void *mysqlnd_palloc_get_zval(MYSQLND_THD_ZVAL_PCACHE * const thd_cache, zend_bo
void *ret = NULL;
DBG_ENTER("mysqlnd_palloc_get_zval");
- DBG_INF_FMT("cache=%p *last_added=%p free_items=%d",
- thd_cache, thd_cache? thd_cache->parent->free_list.last_added:NULL,
- thd_cache->parent->free_items);
+ if (thd_cache) {
+ DBG_INF_FMT("cache=%p *last_added=%p free_items=%d",
+ thd_cache, thd_cache->parent->free_list.last_added,
+ thd_cache->parent->free_items);
+ }
if (thd_cache) {
MYSQLND_ZVAL_PCACHE *cache = thd_cache->parent;
@@ -343,11 +345,13 @@ void mysqlnd_palloc_zval_ptr_dtor(zval **zv, MYSQLND_THD_ZVAL_PCACHE * const thd
{
MYSQLND_ZVAL_PCACHE *cache;
DBG_ENTER("mysqlnd_palloc_zval_ptr_dtor");
- DBG_INF_FMT("cache=%p parent_block=%p last_in_block=%p *zv=%p refc=%d type=%d ",
- thd_cache,
- thd_cache->parent? thd_cache->parent->block:NULL,
- thd_cache->parent? thd_cache->parent->last_in_block:NULL,
- *zv, Z_REFCOUNT_PP(zv), type);
+ if (thd_cache) {
+ DBG_INF_FMT("cache=%p parent_block=%p last_in_block=%p *zv=%p refc=%d type=%d ",
+ thd_cache,
+ thd_cache->parent->block,
+ thd_cache->parent->last_in_block,
+ *zv, Z_REFCOUNT_PP(zv), type);
+ }
*copy_ctor_called = FALSE;
/* Check whether cache is used and the zval is from the cache */
if (!thd_cache || !(cache = thd_cache->parent) || ((char *)*zv < (char *)thd_cache->parent->block ||