From e06a5063efdcd7c5ac6a869bb6b94eed6a7f37ad Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Mon, 11 Jan 2010 10:40:33 +1100 Subject: [PATCH] be strict about port numbers being in in_port_t not uint32_t --- libmemcached/parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmemcached/parse.c b/libmemcached/parse.c index 73cc9dfe..6675b1a3 100644 --- a/libmemcached/parse.c +++ b/libmemcached/parse.c @@ -10,7 +10,7 @@ memcached_server_st *memcached_servers_parse(const char *server_strings) { char *string; - uint32_t port; + in_port_t port; uint32_t weight; const char *begin_ptr; const char *end_ptr; @@ -52,7 +52,7 @@ memcached_server_st *memcached_servers_parse(const char *server_strings) ptr++; - port= (uint32_t) strtoul(ptr, (char **)NULL, 10); + port= (in_port_t) strtoul(ptr, (char **)NULL, 10); ptr2= index(ptr, ' '); if (! ptr2) -- 2.30.2