X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fsasl.cc;h=40d37e3a6e9f165743f22e56fc84803b5f35cbcf;hb=556d9cca3738f2dcecbe0cda93ba9dd89d1a7a31;hp=ce61e3182f93421c5d1fc7c562d957e467df50a5;hpb=5993f4b91e77db90cc0abfb675d903a05d3c5261;p=m6w6%2Flibmemcached diff --git a/libmemcached/sasl.cc b/libmemcached/sasl.cc index ce61e318..40d37e3a 100644 --- a/libmemcached/sasl.cc +++ b/libmemcached/sasl.cc @@ -427,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... */ - size_t total= 0; + ptrdiff_t total= 0; while (source->sasl.callbacks[total].id != SASL_CB_LIST_END) { @@ -453,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... */ - 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) { @@ -462,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 */ - for (size_t y= 0; y < x; ++y) + for (ptrdiff_t y= 0; y < x; ++y) { libmemcached_free(clone, clone->sasl.callbacks[y].context); } @@ -479,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 */ - for (size_t y= 0; y < x; ++y) + for (ptrdiff_t y= 0; y < x; ++y) { libmemcached_free(clone, clone->sasl.callbacks[y].context); }