memset(key, 0, MEMCACHED_MAX_KEY);
*key_length= 0;
- for (; end_ptr == string_ptr || *string_ptr != ' '; string_ptr++)
+ for (; end_ptr > string_ptr && *string_ptr != ' '; string_ptr++)
{
*key= *string_ptr;
key++;
}
}
else /* Skip characters */
- for (; end_ptr == string_ptr || *string_ptr != ' '; string_ptr++);
+ for (; end_ptr > string_ptr && *string_ptr != ' '; string_ptr++);
if (end_ptr == string_ptr)
goto read_error;
string_ptr++;
if (end_ptr == string_ptr)
goto read_error;
- for (next_ptr= string_ptr; end_ptr == string_ptr || *string_ptr != ' '; string_ptr++);
+ for (next_ptr= string_ptr; end_ptr > string_ptr && *string_ptr != ' '; string_ptr++);
*flags= (uint16_t)strtol(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
if (end_ptr == string_ptr)
goto read_error;
- for (next_ptr= string_ptr; end_ptr == string_ptr || *string_ptr != ' '; string_ptr++);
+ for (next_ptr= string_ptr; end_ptr > string_ptr && *string_ptr != ' '; string_ptr++);
*value_length= (size_t)strtoll(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
unsigned long long total= 0;
int size= 0;
- srand(time(NULL));
char key[10];
char randomstuff[6 * 1024];
memcached_return rc;
memset(randomstuff, 0, 6 * 1024);
+ /* We just keep looking at the same values over and over */
+ srandom(10);
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, &setter);
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, &setter);
unsigned int x;
unsigned long long total;
-
setter= 1;
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, &setter);
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, &setter);