projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-205
[m6w6/libmemcached]
/
clients
/
generator.cc
diff --git
a/clients/generator.cc
b/clients/generator.cc
index e41d9c58acecdf53f9a7a0ed90a4917f1ee62f23..df805153ce29327e51e93d73842fe0d66ba099b4 100644
(file)
--- a/
clients/generator.cc
+++ b/
clients/generator.cc
@@
-10,7
+10,7
@@
*
*/
*
*/
-#include <config.h>
+#include <
mem_
config.h>
#include <stdint.h>
#include <stdint.h>
@@
-20,7
+20,7
@@
#include <iostream>
#include <unistd.h>
#include <iostream>
#include <unistd.h>
-#include "generator.h"
+#include "
clients/
generator.h"
/* Use this for string generation */
static const char ALPHANUMERICS[]=
/* Use this for string generation */
static const char ALPHANUMERICS[]=
@@
-33,12
+33,14
@@
static size_t get_alpha_num(void)
return (size_t)random() % ALPHANUMERICS_SIZE;
}
return (size_t)random() % ALPHANUMERICS_SIZE;
}
-
static
void get_random_string(char *buffer, size_t size)
+void get_random_string(char *buffer, size_t size)
{
char *buffer_ptr= buffer;
while (--size)
{
char *buffer_ptr= buffer;
while (--size)
+ {
*buffer_ptr++= ALPHANUMERICS[get_alpha_num()];
*buffer_ptr++= ALPHANUMERICS[get_alpha_num()];
+ }
*buffer_ptr++= ALPHANUMERICS[get_alpha_num()];
}
*buffer_ptr++= ALPHANUMERICS[get_alpha_num()];
}