~yeban/libmemcached/todo-host.c

« back to all changes in this revision

Viewing changes to libhashkit/ketama.c

  • Committer: Brian Aker
  • Date: 2011-03-17 21:45:08 UTC
  • Revision ID: brian@tangent.org-20110317214508-ogufz6pusakvcch0
Merge in updates to make sure exit/return is done properly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
  hashkit_continuum_point_st *ct2= (hashkit_continuum_point_st *)t2;
28
28
 
29
29
  if (ct1->value == ct2->value)
30
 
    return 0;
 
30
    return EXIT_SUCCESS;
31
31
  else if (ct1->value > ct2->value)
32
 
    return 1;
 
32
    return EXIT_FAILURE;
33
33
  else
34
34
    return -1;
35
35
}
71
71
    live_servers= (uint32_t)hashkit->list_size;
72
72
 
73
73
  if (live_servers == 0)
74
 
    return 0;
 
74
    return EXIT_SUCCESS;
75
75
 
76
76
  if (hashkit->weight_fn == NULL)
77
77
  {
159
159
  qsort(hashkit->continuum, hashkit->continuum_points_count, sizeof(hashkit_continuum_point_st),
160
160
        continuum_points_cmp);
161
161
 
162
 
  return 0;
 
162
  return EXIT_SUCCESS;
163
163
}
164
164
#endif