Updating from Monty
[m6w6/libmemcached] / clients / memerror.c
index 84882520d7fe2879e5adeb69f7c7978d509cc8a2..1ac091186f67f57436ce0041f1bc4226c2274675 100644 (file)
@@ -8,8 +8,8 @@
  * Summary:
  *
  */
+#include "config.h"
 
-#include "libmemcached/common.h"
 #include <stdio.h>
 #include <inttypes.h>
 #include <string.h>
@@ -37,9 +37,9 @@ int main(int argc, char *argv[])
   if (argc != 2)
     return 1;
 
-  value= strtol(argv[1], (char **) NULL, 10);
+  value= strtoul(argv[1], (char **) NULL, 10);
 
-  if (value >= MEMCACHED_SUCCESS && value < MEMCACHED_MAXIMUM_RETURN)
+  if (value < MEMCACHED_MAXIMUM_RETURN)
   {
     printf("%s\n", memcached_strerror(NULL, (memcached_return_t)value));
   }