Update yatl.
[awesomized/libmemcached] / libtest / drizzled.cc
index 70eca0268591f8efbe511044e7d687fdbee4c64c..16933c4bdab08e09a0573c5b8b629223e437f0c8 100644 (file)
@@ -34,7 +34,7 @@
  *
  */
 
-#include <config.h>
+#include "libtest/yatlcon.h"
 #include <libtest/common.h>
 
 #include <libtest/drizzled.h>
@@ -70,6 +70,7 @@ using namespace libtest;
 namespace libtest {
 bool ping_drizzled(const in_port_t _port)
 {
+  (void)(_port);
 #if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE
   {
     drizzle_st *drizzle= drizzle_create(NULL);
@@ -148,7 +149,7 @@ public:
     return "drizzled";
   };
 
-  void log_file_option(Application& app, const std::string& arg)
+  void log_file_option(Application&, const std::string&)
   {
   }
 
@@ -181,9 +182,10 @@ public:
   {
     if (arg > 0)
     {
-      char buffer[1024];
-      snprintf(buffer, sizeof(buffer), "--drizzle-protocol.port=%d", int(arg));
-      app.add_option(buffer);
+      libtest::vchar_t buffer;
+      buffer.resize(1024);
+      snprintf(&buffer[1024], buffer.size(), "--drizzle-protocol.port=%d", int(arg));
+      app.add_option(&buffer[1024]);
     }
   }
 
@@ -204,6 +206,11 @@ bool Drizzle::build(size_t argc, const char *argv[])
 
   for (size_t x= 0 ; x < argc ; x++)
   {
+    if (argv[x] == NULL)
+    {
+      break;
+    }
+
     add_option(argv[x]);
   }