diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-06-30 04:05:24 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-06-30 04:05:24 +0300 |
commit | 4a2e40bb861bc3cf5fb6863e57486ed60316e97c (patch) | |
tree | 6579660b282fdd1bc50095e48d702913a0b6aa97 /ext/sysvmsg | |
parent | 8cce5b2641fb91c3073018b59f6f044b843041a8 (diff) | |
download | php-git-4a2e40bb861bc3cf5fb6863e57486ed60316e97c.tar.gz |
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
Diffstat (limited to 'ext/sysvmsg')
-rw-r--r-- | ext/sysvmsg/sysvmsg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index d0a079c280..09cf0a561f 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -422,9 +422,9 @@ PHP_FUNCTION(msg_send) /* NB: php_msgbuf is 1 char bigger than a long, so there is no need to * allocate the extra byte. */ - messagebuffer = safe_emalloc(msg_var.s->len, 1, sizeof(struct php_msgbuf)); - memcpy(messagebuffer->mtext, msg_var.s->val, msg_var.s->len + 1); - message_len = msg_var.s->len; + messagebuffer = safe_emalloc(ZSTR_LEN(msg_var.s), 1, sizeof(struct php_msgbuf)); + memcpy(messagebuffer->mtext, ZSTR_VAL(msg_var.s), ZSTR_LEN(msg_var.s) + 1); + message_len = ZSTR_LEN(msg_var.s); smart_str_free(&msg_var); } else { char *p; |