From bb1dde6b3ac6e20db1666f401741694498d83b1f Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Mon, 11 Jan 2010 10:40:22 +1100 Subject: [PATCH] be strict about port numbers being in in_port_t not uint32_t --- tests/function.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/function.c b/tests/function.c index 71e13695..29de4f73 100644 --- a/tests/function.c +++ b/tests/function.c @@ -80,7 +80,7 @@ static test_return_t server_list_null_test(memcached_st *ptr __attribute__((unu } #define TEST_PORT_COUNT 7 -uint32_t test_ports[TEST_PORT_COUNT]; +in_port_t test_ports[TEST_PORT_COUNT]; static memcached_return_t server_display_function(memcached_st *ptr __attribute__((unused)), memcached_server_st *server, void *context) { @@ -106,7 +106,7 @@ static test_return_t server_sort_test(memcached_st *ptr __attribute__((unused)) for (x= 0; x < TEST_PORT_COUNT; x++) { - test_ports[x]= (uint32_t)random() % 64000; + test_ports[x]= (in_port_t)random() % 64000; rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0); test_truth(memcached_server_count(local_memc) == x + 1); test_truth(memcached_servers_count(local_memc->hosts) == x+1); @@ -177,7 +177,7 @@ static test_return_t server_unsort_test(memcached_st *ptr __attribute__((unused for (x= 0; x < TEST_PORT_COUNT; x++) { - test_ports[x]= (uint32_t)(random() % 64000); + test_ports[x]= (in_port_t)(random() % 64000); rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0); test_truth(memcached_server_count(local_memc) == x+1); test_truth(memcached_servers_count(local_memc->hosts) == x+1); -- 2.30.2