projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Const issue for C++ include.
[m6w6/libmemcached]
/
libmemcached
/
sasl.cc
diff --git
a/libmemcached/sasl.cc
b/libmemcached/sasl.cc
index 902ccd872cf77ee7ede0903730a31c6c9bd96f3d..40d37e3a6e9f165743f22e56fc84803b5f35cbcf 100644
(file)
--- a/
libmemcached/sasl.cc
+++ b/
libmemcached/sasl.cc
@@
-40,7
+40,10
@@
#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
+#if defined(HAVE_LIBSASL) && HAVE_LIBSASL
#include <sasl/sasl.h>
#include <sasl/sasl.h>
+#endif
+
#include <pthread.h>
void memcached_set_sasl_callbacks(memcached_st *ptr,
#include <pthread.h>
void memcached_set_sasl_callbacks(memcached_st *ptr,
@@
-424,7
+427,7
@@
memcached_return_t memcached_clone_sasl(memcached_st *clone, const memcached_st
* into the list, but if we don't know the ID we don't know how to handle
* the context...
*/
* into the list, but if we don't know the ID we don't know how to handle
* the context...
*/
-
size
_t total= 0;
+
ptrdiff
_t total= 0;
while (source->sasl.callbacks[total].id != SASL_CB_LIST_END)
{
while (source->sasl.callbacks[total].id != SASL_CB_LIST_END)
{
@@
-450,7
+453,7
@@
memcached_return_t memcached_clone_sasl(memcached_st *clone, const memcached_st
memcpy(callbacks, source->sasl.callbacks, (total + 1) * sizeof(sasl_callback_t));
/* Now update the context... */
memcpy(callbacks, source->sasl.callbacks, (total + 1) * sizeof(sasl_callback_t));
/* Now update the context... */
- for (
size
_t x= 0; x < total; ++x)
+ for (
ptrdiff
_t x= 0; x < total; ++x)
{
if (callbacks[x].id == SASL_CB_USER || callbacks[x].id == SASL_CB_AUTHNAME)
{
{
if (callbacks[x].id == SASL_CB_USER || callbacks[x].id == SASL_CB_AUTHNAME)
{
@@
-459,7
+462,7
@@
memcached_return_t memcached_clone_sasl(memcached_st *clone, const memcached_st
if (callbacks[x].context == NULL)
{
/* Failed to allocate memory, clean up previously allocated memory */
if (callbacks[x].context == NULL)
{
/* Failed to allocate memory, clean up previously allocated memory */
- for (
size
_t y= 0; y < x; ++y)
+ for (
ptrdiff
_t y= 0; y < x; ++y)
{
libmemcached_free(clone, clone->sasl.callbacks[y].context);
}
{
libmemcached_free(clone, clone->sasl.callbacks[y].context);
}
@@
-476,7
+479,7
@@
memcached_return_t memcached_clone_sasl(memcached_st *clone, const memcached_st
if (n == NULL)
{
/* Failed to allocate memory, clean up previously allocated memory */
if (n == NULL)
{
/* Failed to allocate memory, clean up previously allocated memory */
- for (
size
_t y= 0; y < x; ++y)
+ for (
ptrdiff
_t y= 0; y < x; ++y)
{
libmemcached_free(clone, clone->sasl.callbacks[y].context);
}
{
libmemcached_free(clone, clone->sasl.callbacks[y].context);
}