X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fatomsmasher.c;h=eee08d6b724da3a4616e10e362b7a024f9e0d15e;hb=42518be7c87a0f575528503250876b55cd9c0f23;hp=08aa86f7f7cb3d72f30cb15ba4efb12ca97a8240;hpb=7e0ffed050b62cc5dcf5d16c148185074bfd7d50;p=awesomized%2Flibmemcached diff --git a/tests/atomsmasher.c b/tests/atomsmasher.c index 08aa86f7..eee08d6b 100644 --- a/tests/atomsmasher.c +++ b/tests/atomsmasher.c @@ -1,6 +1,8 @@ /* Sample test application. */ +#include "libmemcached/common.h" + #include #include #include @@ -11,7 +13,6 @@ #include #include #include "server.h" -#include "../libmemcached/common.h" #include "../clients/generator.h" #include "../clients/execute.h" @@ -72,8 +73,8 @@ infinite: uint32_t test_bit; uint8_t which; - test_bit= random() % GLOBAL_COUNT; - which= random() % 2; + test_bit= (uint32_t)(random() % GLOBAL_COUNT); + which= (uint8_t)(random() % 2); if (which == 0) { @@ -172,7 +173,7 @@ static test_return add_test(memcached_st *memc) /* Too many broken OS'es have broken loopback in async, so we can't be sure of the result */ if (setting_value) - assert(rc == MEMCACHED_NOTSTORED || MEMCACHED_STORED); + assert(rc == MEMCACHED_NOTSTORED || rc == MEMCACHED_STORED); else assert(rc == MEMCACHED_NOTSTORED);