mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Use ZEND_STRL where appropriate.
Use the `ZEND_STRL` macro in several places rather than manually sending a static string and its length as a constant.
This commit is contained in:
committed by
Michael Grunder
parent
c139de3aba
commit
f8c762e70b
+2
-1
@@ -277,7 +277,8 @@ RedisArray *ra_load_array(const char *name) {
|
||||
array_init(&z_tmp);
|
||||
sapi_module.treat_data(PARSE_STRING, estrdup(iptr), &z_tmp);
|
||||
if ((z_data = zend_hash_str_find(Z_ARRVAL(z_tmp), name, name_len)) != NULL) {
|
||||
consistent = Z_TYPE_P(z_data) == IS_STRING && strncmp(Z_STRVAL_P(z_data), "1", 1) == 0;
|
||||
consistent = Z_TYPE_P(z_data) == IS_STRING &&
|
||||
strncmp(Z_STRVAL_P(z_data), ZEND_STRL("1")) == 0;
|
||||
}
|
||||
zval_dtor(&z_tmp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user