projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Clarified return type for prefix key in cases where it is too long.
[awesomized/libmemcached]
/
clients
/
memcp.c
diff --git
a/clients/memcp.c
b/clients/memcp.c
index 780514c1bc56b7bf7daac5878f85cd8449a9af5f..cf06a573bed5d20d4d9901d787b8d502dbdb5040 100644
(file)
--- a/
clients/memcp.c
+++ b/
clients/memcp.c
@@
-10,7
+10,6
@@
#include <errno.h>
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <strings.h>
#include <string.h>
-#include <assert.h>
#include <libmemcached/memcached.h>
#include <libmemcached/memcached.h>
@@
-106,7
+105,12
@@
int main(int argc, char *argv[])
fprintf(stderr, "read: %s\n", strerror(errno));
exit(1);
}
fprintf(stderr, "read: %s\n", strerror(errno));
exit(1);
}
- assert(read_length == sbuf.st_size);
+
+ if (read_length != sbuf.st_size)
+ {
+ fprintf(stderr, "Failure reading from file\n");
+ exit(1);
+ }
if (opt_method == OPT_ADD)
rc= memcached_add(memc, ptr, strlen(ptr),
if (opt_method == OPT_ADD)
rc= memcached_add(memc, ptr, strlen(ptr),