From 9c7e633e8f6a725b7d06331b5778556efac99930 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 29 Jul 2011 20:11:55 -0700 Subject: [PATCH] Merge in removal of dead constants (don't need them any longer). --- libmemcached/connect.cc | 9 --------- libmemcached/constants.h | 9 ++++++--- libmemcached/server.cc | 4 ---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/libmemcached/connect.cc b/libmemcached/connect.cc index 602bc5e9..07bb545b 100644 --- a/libmemcached/connect.cc +++ b/libmemcached/connect.cc @@ -590,11 +590,6 @@ memcached_return_t memcached_connect(memcached_server_write_instance_st ptr) /* We need to clean up the multi startup piece */ switch (ptr->type) { - case MEMCACHED_CONNECTION_UNKNOWN: - WATCHPOINT_ASSERT(0); - rc= MEMCACHED_NOT_SUPPORTED; - break; - case MEMCACHED_CONNECTION_UDP: case MEMCACHED_CONNECTION_TCP: rc= network_connect(ptr); @@ -615,10 +610,6 @@ memcached_return_t memcached_connect(memcached_server_write_instance_st ptr) case MEMCACHED_CONNECTION_UNIX_SOCKET: rc= unix_socket_connect(ptr); break; - - case MEMCACHED_CONNECTION_MAX: - default: - WATCHPOINT_ASSERT(0); } if (memcached_success(rc)) diff --git a/libmemcached/constants.h b/libmemcached/constants.h index 165745e7..e17e676e 100644 --- a/libmemcached/constants.h +++ b/libmemcached/constants.h @@ -155,11 +155,14 @@ typedef enum memcached_hash_t memcached_hash_t; #endif enum memcached_connection_t { - MEMCACHED_CONNECTION_UNKNOWN, MEMCACHED_CONNECTION_TCP, MEMCACHED_CONNECTION_UDP, - MEMCACHED_CONNECTION_UNIX_SOCKET, - MEMCACHED_CONNECTION_MAX + MEMCACHED_CONNECTION_UNIX_SOCKET +}; + +enum { + MEMCACHED_CONNECTION_UNKNOWN= 0, + MEMCACHED_CONNECTION_MAX= 0 }; #ifndef __cplusplus diff --git a/libmemcached/server.cc b/libmemcached/server.cc index bde53c7e..5576caaa 100644 --- a/libmemcached/server.cc +++ b/libmemcached/server.cc @@ -360,10 +360,6 @@ const char *memcached_server_type(const memcached_server_instance_st ptr) case MEMCACHED_CONNECTION_UNIX_SOCKET: return "SOCKET"; - - case MEMCACHED_CONNECTION_MAX: - case MEMCACHED_CONNECTION_UNKNOWN: - break; } } -- 2.30.2