Cleaning out asserts;
[awesomized/libmemcached] / src / memcat.c
index 88018e19466f1290161a5556de5cc1e6cc34c593..057a585c8e7f61332c23090b0fc273f6c166abbc 100644 (file)
@@ -1,4 +1,6 @@
 #include <stdio.h>
+#include <stdint.h>
+#include <string.h>
 #include <unistd.h>
 #include <getopt.h>
 #include <memcached.h>
@@ -67,8 +69,11 @@ int main(int argc, char *argv[])
     }
     else if (rc != MEMCACHED_NOTFOUND)
     {
-      fprintf(stderr, "memcat: %s: memcache error %s\n", 
+      fprintf(stderr, "memcat: %s: memcache error %s", 
               argv[optind], memcached_strerror(memc, rc));
+      if (memc->my_errno)
+       fprintf(stderr, " system error %s", strerror(memc->my_errno));
+      fprintf(stderr, "\n");
     }
     optind++;
   }