From: Brian Aker Date: Wed, 17 Aug 2011 23:27:24 +0000 (-0700) Subject: Style cleanup X-Git-Tag: 0.52~16 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e6006d0cb51d89dfbcb02124f5f82df38c9b8ce1;p=m6w6%2Flibmemcached Style cleanup --- diff --git a/libmemcached/connect.cc b/libmemcached/connect.cc index fa35d84e..5a0083f4 100644 --- a/libmemcached/connect.cc +++ b/libmemcached/connect.cc @@ -43,8 +43,8 @@ static memcached_return_t connect_poll(memcached_server_st *ptr) { struct pollfd fds[1]; - fds[0].fd = ptr->fd; - fds[0].events = POLLOUT; + fds[0].fd= ptr->fd; + fds[0].events= POLLOUT; size_t loop_max= 5; @@ -186,7 +186,7 @@ static memcached_return_t set_hostinfo(memcached_server_st *server) static inline void set_socket_nonblocking(memcached_server_st *ptr) { #ifdef WIN32 - u_long arg = 1; + u_long arg= 1; if (ioctlsocket(ptr->fd, FIONBIO, &arg) == SOCKET_ERROR) { memcached_set_errno(*ptr, get_socket_errno(), NULL); diff --git a/tests/mem_functions.cc b/tests/mem_functions.cc index d691cbc5..492467ca 100644 --- a/tests/mem_functions.cc +++ b/tests/mem_functions.cc @@ -1278,7 +1278,7 @@ static test_return_t mget_end(memcached_st *memc) // this should indicate end string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc); - test_true(rc == MEMCACHED_END); + test_compare(MEMCACHED_END, rc); return TEST_SUCCESS; } @@ -2622,8 +2622,7 @@ static test_return_t user_supplied_bug10(memcached_st *memc) memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set); memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set); - int32_t timeout= 0; - memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, (uint64_t)timeout); + memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, uint64_t(0)); char *value= (char*)malloc(value_length * sizeof(char));