Updating the get function in the C++ interface.
[m6w6/libmemcached] / tests / atomsmasher.c
index 500e2e8e1aaec308c39a541dad30ad6609344587..eee08d6b724da3a4616e10e362b7a024f9e0d15e 100644 (file)
@@ -73,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)
     {
@@ -173,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);