More modifications to the C++ interface. Changing the return type of a
[m6w6/libmemcached] / clients / utilities.c
index 1e8e89d70a0a50671fdd87dfa16ab96e2328516a..6551684db003f26c0497c80d149d0da1f6f04b3e 100644 (file)
@@ -1,3 +1,4 @@
+#include "libmemcached/common.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -8,9 +9,9 @@ long int timedif(struct timeval a, struct timeval b)
 {
   register int us, s;
 
-  us = a.tv_usec - b.tv_usec;
+  us = (int)(a.tv_usec - b.tv_usec);
   us /= 1000;
-  s = a.tv_sec - b.tv_sec;
+  s = (int)(a.tv_sec - b.tv_sec);
   s *= 1000;
   return s + us;
 }
@@ -44,6 +45,9 @@ static char *lookup_help(memcached_options option)
   case OPT_FLUSH: return("Flush servers before running tests.");
   case OPT_HASH: return("Select hash type.");
   case OPT_BINARY: return("Switch to binary protocol.");
+  case OPT_ANALYZE: return("Analyze the provided servers.");
+  case OPT_UDP: return("Use UDP protocol when communicating with server.");
+  default: WATCHPOINT_ASSERT(0);
   };
 
   WATCHPOINT_ASSERT(0);