From 0c77d1dcd817bd159682344d186e920cd8c9c150 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 30 Oct 2017 14:32:44 +0100 Subject: Minor code cleanup --- src/sp_utils.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/sp_utils.c') diff --git a/src/sp_utils.c b/src/sp_utils.c index fdd2b66..1ba0fe7 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -183,19 +183,14 @@ int sp_log_request(const char* folder) { static char *zv_str_to_char(zval *zv) { zval copy; - char *ret; - ZVAL_ZVAL(©, zv, 1, 0); - // str = zend_string_dup(Z_STR_P(zv), 0); for (size_t i = 0; i < Z_STRLEN(copy); i++) { if (Z_STRVAL(copy)[i] == '\0') { Z_STRVAL(copy)[i] = '0'; } } - ret = estrdup(Z_STRVAL(copy)); - // zend_string_release(str); - return ret; + return estrdup(Z_STRVAL(copy)); } -- cgit v1.3