projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Cleanup from memaslap
[awesomized/libmemcached]
/
libhashkit
/
ketama.c
diff --git
a/libhashkit/ketama.c
b/libhashkit/ketama.c
index 560de30031ccc329a5afcc4a3b238e3da4fb3a96..45052c22baade12761b69dd5091558bb1837dfb8 100644
(file)
--- a/
libhashkit/ketama.c
+++ b/
libhashkit/ketama.c
@@
-6,7
+6,7
@@
* the COPYING file in the parent directory for full text.
*/
* the COPYING file in the parent directory for full text.
*/
-#include
"common.h"
+#include
<libhashkit/common.h>
#include <math.h>
#if 0
#include <math.h>
#if 0
@@
-27,9
+27,9
@@
static int continuum_points_cmp(const void *t1, const void *t2)
hashkit_continuum_point_st *ct2= (hashkit_continuum_point_st *)t2;
if (ct1->value == ct2->value)
hashkit_continuum_point_st *ct2= (hashkit_continuum_point_st *)t2;
if (ct1->value == ct2->value)
- return
EXIT_SUCCESS
;
+ return
0
;
else if (ct1->value > ct2->value)
else if (ct1->value > ct2->value)
- return
EXIT_FAILURE
;
+ return
1
;
else
return -1;
}
else
return -1;
}
@@
-71,7
+71,7
@@
int update_continuum(hashkit_st *hashkit)
live_servers= (uint32_t)hashkit->list_size;
if (live_servers == 0)
live_servers= (uint32_t)hashkit->list_size;
if (live_servers == 0)
- return
EXIT_SUCCESS
;
+ return
0
;
if (hashkit->weight_fn == NULL)
{
if (hashkit->weight_fn == NULL)
{
@@
-159,6
+159,6
@@
int update_continuum(hashkit_st *hashkit)
qsort(hashkit->continuum, hashkit->continuum_points_count, sizeof(hashkit_continuum_point_st),
continuum_points_cmp);
qsort(hashkit->continuum, hashkit->continuum_points_count, sizeof(hashkit_continuum_point_st),
continuum_points_cmp);
- return
EXIT_SUCCESS
;
+ return
0
;
}
#endif
}
#endif