Skip to content

Commit c6519dd

Browse files
yatsukhnenkomichael-grunder
authored andcommitted
`sizeof(void *)` isn't standard so change it to `sizeof(char *)`
1 parent f9016f1 commit c6519dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,8 +1812,8 @@ redis_sock_disconnect(RedisSock *redis_sock, int force TSRMLS_DC)
18121812
zend_resource *le = zend_hash_find_ptr(&EG(persistent_list), persistent_id);
18131813
if (!le) {
18141814
zend_llist *l = pecalloc(1, sizeof(*l) + sizeof(*le), 1);
1815-
zend_llist_init(l, sizeof(void *), NULL, 1);
1816-
le = (void *)l + sizeof(*l);
1815+
zend_llist_init(l, sizeof(php_stream *), NULL, 1);
1816+
le = (zend_resource *)((char *)l + sizeof(*l));
18171817
le->type = le_redis_pconnect;
18181818
le->ptr = l;
18191819
zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(persistent_id), ZSTR_LEN(persistent_id), le, sizeof(*le));

0 commit comments

Comments
 (0)