From bb29047ba8d9d6409c44e1f0c97ce6958340419b Mon Sep 17 00:00:00 2001 From: Mark Atwood Date: Sun, 20 Apr 2008 13:17:05 -0700 Subject: [PATCH] fix minor bug in compare_servers() --- libmemcached/memcached_hosts.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libmemcached/memcached_hosts.c b/libmemcached/memcached_hosts.c index 76fd5a01..bdbdcbb6 100644 --- a/libmemcached/memcached_hosts.c +++ b/libmemcached/memcached_hosts.c @@ -40,10 +40,7 @@ static int compare_servers(const void *p1, const void *p2) if (return_value == 0) { - if (a->port > b->port) - return_value++; - else - return_value--; + return_value= (int) (a->port - b->port); } return return_value; -- 2.30.2