Update yatl.
[awesomized/libmemcached] / clients / generator.cc
index d24ad139bad45f1d5dd601bec9ad454286393ccc..df805153ce29327e51e93d73842fe0d66ba099b4 100644 (file)
@@ -1,4 +1,5 @@
 /* LibMemcached
+ * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
  * Copyright (C) 2006-2009 Brian Aker
  * All rights reserved.
  *
@@ -9,7 +10,7 @@
  *
  */
 
-#include <config.h>
+#include <mem_config.h>
 
 #include <stdint.h>
 
@@ -19,7 +20,7 @@
 #include <iostream>
 #include <unistd.h>
 
-#include "generator.h"
+#include "clients/generator.h"
 
 /* Use this for string generation */
 static const char ALPHANUMERICS[]=
@@ -32,12 +33,14 @@ static size_t get_alpha_num(void)
   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)
+  {
     *buffer_ptr++= ALPHANUMERICS[get_alpha_num()];
+  }
   *buffer_ptr++= ALPHANUMERICS[get_alpha_num()];
 }