From: Brian Aker Date: Sat, 30 Jul 2011 03:11:55 +0000 (-0700) Subject: Merge in removal of dead constants (don't need them any longer). X-Git-Tag: 0.52~38 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9c7e633e8f6a725b7d06331b5778556efac99930;p=m6w6%2Flibmemcached Merge in removal of dead constants (don't need them any longer). --- 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; } }