Skip to content

Update a few PHP 7 issues #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 1, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use strpprintf
  • Loading branch information
laruence committed Feb 5, 2015
commit a9f703c3849a1056f356bdfc21ae1f3280fe2907
8 changes: 3 additions & 5 deletions php_memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -2760,11 +2760,9 @@ static PHP_METHOD(Memcached, getResultMessage)
case MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE:
case MEMCACHED_UNKNOWN_READ_FAILURE:
if (i_obj->memc_errno) {
char *str;
int str_len;
str_len = spprintf(&str, 0, "%s: %s", memcached_strerror(m_obj->memc, (memcached_return)i_obj->rescode),
strerror(i_obj->memc_errno));
RETURN_STRINGL(str, str_len);
zend_string *str = strpprintf(0, "%s: %s",
memcached_strerror(m_obj->memc, (memcached_return)i_obj->rescode), strerror(i_obj->memc_errno));
RETURN_STR(str);
}
/* Fall through */
default:
Expand Down