This adds a couple of new options for options parsing.
[m6w6/libmemcached] / libhashkit / ketama.c
index a510e57ab1ea802026d185cfcde3693c1fec7633..560de30031ccc329a5afcc4a3b238e3da4fb3a96 100644 (file)
@@ -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)
-    return 0;
+    return EXIT_SUCCESS;
   else if (ct1->value > ct2->value)
-    return 1;
+    return EXIT_FAILURE;
   else
     return -1;
 }
@@ -71,7 +71,7 @@ int update_continuum(hashkit_st *hashkit)
     live_servers= (uint32_t)hashkit->list_size;
 
   if (live_servers == 0)
-    return 0;
+    return EXIT_SUCCESS;
 
   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);
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 #endif