From: Stewart Smith Date: Sun, 10 Jan 2010 23:40:33 +0000 (+1100) Subject: be strict about port numbers being in in_port_t not uint32_t X-Git-Tag: 0.40~125^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;ds=sidebyside;h=e06a5063efdcd7c5ac6a869bb6b94eed6a7f37ad;hp=bb1dde6b3ac6e20db1666f401741694498d83b1f;p=awesomized%2Flibmemcached be strict about port numbers being in in_port_t not uint32_t --- 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)