diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2016-11-13 15:59:54 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2016-11-13 16:12:40 +0300 |
commit | d7d18bfa05d34b16941410bd2d45e326ab1c84d9 (patch) | |
tree | 36deeda41271459c2dcae72c62d6e1d1170ccce5 /redis_array_impl.c | |
parent | 843128386fc25005495af2ad8b324c06f918d7a9 (diff) |
refactoring
Use estrndup instead os estrdup/emalloc+memcpy
Diffstat (limited to 'redis_array_impl.c')
-rw-r--r-- | redis_array_impl.c | 2 |
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 */ |