From: Date: Fri, 2 May 2008 22:11:07 +0000 (-0700) Subject: Removed old asserts in client apps. X-Git-Tag: _20~1^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=7c41f51579dc36df33ec83a743dba8cc1ddc3e3f;p=m6w6%2Flibmemcached Removed old asserts in client apps. --- diff --git a/clients/memcp.c b/clients/memcp.c index 780514c1..5b80fd64 100644 --- a/clients/memcp.c +++ b/clients/memcp.c @@ -10,7 +10,6 @@ #include #include #include -#include #include @@ -106,7 +105,12 @@ int main(int argc, char *argv[]) fprintf(stderr, "read: %s\n", strerror(errno)); exit(1); } - assert(read_length == sbuf.st_size); + + if (read_length != sbuf.st_size); + { + fprintf(stderr, "Failure reading from file\n"); + exit(1); + } if (opt_method == OPT_ADD) rc= memcached_add(memc, ptr, strlen(ptr), diff --git a/clients/memslap.c b/clients/memslap.c index 01f11e2d..6fc8176f 100644 --- a/clients/memslap.c +++ b/clients/memslap.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/clients/memstat.c b/clients/memstat.c index 3f1a78a3..36ee343e 100644 --- a/clients/memstat.c +++ b/clients/memstat.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -71,8 +70,6 @@ int main(int argc, char *argv[]) char **ptr; list= memcached_stat_get_keys(memc, &stat[x], &rc); - assert(list); - assert(rc == MEMCACHED_SUCCESS); printf("Server: %s (%u)\n", memcached_server_name(memc, server_list[x]), memcached_server_port(memc, server_list[x])); diff --git a/libmemcached/memcached_hosts.c b/libmemcached/memcached_hosts.c index 231b2167..2678a7c1 100644 --- a/libmemcached/memcached_hosts.c +++ b/libmemcached/memcached_hosts.c @@ -221,10 +221,7 @@ memcached_return memcached_server_push(memcached_st *ptr, memcached_server_st *l sizeof(memcached_server_st) * (count + ptr->number_of_hosts)); if (!new_host_list) - { - assert(0); return MEMCACHED_MEMORY_ALLOCATION_FAILURE; - } ptr->hosts= new_host_list;