projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Cleaning out asserts;
[awesomized/libmemcached]
/
src
/
memcp.c
diff --git
a/src/memcp.c
b/src/memcp.c
index f51c93cb16281fa649dc406e28c0b5ffc805d35e..0eb210a701c13dd45ec10c29ceeeba8bd31a877e 100644
(file)
--- a/
src/memcp.c
+++ b/
src/memcp.c
@@
-1,4
+1,6
@@
#include <stdio.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/types.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/types.h>
@@
-7,6
+9,8
@@
#include <fcntl.h>
#include <errno.h>
#include <strings.h>
#include <fcntl.h>
#include <errno.h>
#include <strings.h>
+#include <string.h>
+#include <assert.h>
#include <memcached.h>
#include "client_options.h"
#include <memcached.h>
#include "client_options.h"
@@
-112,8
+116,13
@@
int main(int argc, char *argv[])
opt_expires, opt_flags);
if (rc != MEMCACHED_SUCCESS)
opt_expires, opt_flags);
if (rc != MEMCACHED_SUCCESS)
- fprintf(stderr, "memcp: %s: memcache error %s\n",
+ {
+ fprintf(stderr, "memcp: %s: memcache error %s",
ptr, memcached_strerror(memc, rc));
ptr, memcached_strerror(memc, rc));
+ if (memc->my_errno)
+ fprintf(stderr, " system error %s", strerror(memc->my_errno));
+ fprintf(stderr, "\n");
+ }
free(file_buffer_ptr);
close(fd);
free(file_buffer_ptr);
close(fd);