Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-13 15:59:54 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-13 16:12:40 +0300
commitd7d18bfa05d34b16941410bd2d45e326ab1c84d9 (patch)
tree36deeda41271459c2dcae72c62d6e1d1170ccce5 /redis_array_impl.c
parent843128386fc25005495af2ad8b324c06f918d7a9 (diff)
refactoring
Use estrndup instead os estrdup/emalloc+memcpy
Diffstat (limited to 'redis_array_impl.c')
-rw-r--r--redis_array_impl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis_array_impl.c b/redis_array_impl.c
index 68238f81..5d204414 100644
--- a/redis_array_impl.c
+++ b/redis_array_impl.c
@@ -60,11 +60,11 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, long retry_interval, zend_bool b
return NULL;
}
- ra->hosts[i] = estrdup(Z_STRVAL_P(zpData));
/* default values */
host = Z_STRVAL_P(zpData);
host_len = Z_STRLEN_P(zpData);
+ ra->hosts[i] = estrndup(host, host_len);
port = 6379;
if((p = strrchr(host, ':'))) { /* found port */