X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fatomsmasher.c;h=65a31dd4404f09344fcb999ada6e8b0f11c9eea1;hb=013f64c9388d27db086b8643e267ad224a2ccc84;hp=7c4c8ae396f7f0ceeed6befc3312916b1f3d754f;hpb=9bc31d7e76f2a4c84dba2ae8410cd4c382480193;p=awesomized%2Flibmemcached diff --git a/tests/atomsmasher.c b/tests/atomsmasher.c index 7c4c8ae3..65a31dd4 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) { @@ -186,7 +187,8 @@ static test_return add_test(memcached_st *memc) static test_return many_adds(memcached_st *memc) { unsigned int i; - for (i = 0; i < TEST_COUNTER; i++){ + for (i = 0; i < TEST_COUNTER; i++) + { add_test(memc); } return 0;