summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-09-19 15:41:01 +0400
committerDmitry Stogov <dmitry@zend.com>2014-09-19 15:41:01 +0400
commit3bc8a958c5ec647adbe409ee6411ae7ed6a3dc3b (patch)
treefb2c0e55eacad99b2dbd7e8fbe0137a861714ce7 /ext/pgsql/pgsql.c
parent3ec7c2808420ad58145d6c6b5aeb1293e81ae12b (diff)
downloadphp-git-3bc8a958c5ec647adbe409ee6411ae7ed6a3dc3b.tar.gz
Fixed useless or duplicated IS_INTERNED() checks
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index e06ca1c313..37b5da6ec4 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -5701,7 +5701,7 @@ static int php_pgsql_add_quotes(zval *src, zend_bool should_free TSRMLS_DC)
if (should_free) {
zval_ptr_dtor(src);
}
- ZVAL_STR(src, str.s);
+ ZVAL_NEW_STR(src, str.s);
return SUCCESS;
}
@@ -5971,7 +5971,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
/* better to use PGSQLescapeLiteral since PGescapeStringConn does not handle special \ */
str->len = PQescapeStringConn(pg_link, str->val, Z_STRVAL_P(val), Z_STRLEN_P(val), NULL);
str = zend_string_realloc(str, str->len, 0);
- ZVAL_STR(&new_val, str);
+ ZVAL_NEW_STR(&new_val, str);
php_pgsql_add_quotes(&new_val, 1 TSRMLS_CC);
}
break;
@@ -6268,7 +6268,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
smart_str_appendl(&s, Z_STRVAL(new_val), Z_STRLEN(new_val));
smart_str_0(&s);
zval_ptr_dtor(&new_val);
- ZVAL_STR(&new_val, s.s);
+ ZVAL_NEW_STR(&new_val, s.s);
}
break;