projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fixed all warnings in code.
[awesomized/libmemcached]
/
lib
/
memcached_auto.c
diff --git
a/lib/memcached_auto.c
b/lib/memcached_auto.c
index 268f95b8b5b6474c4a5505f56c62233fe7b88a45..7122dc90096e6db4659dfc2120d0e32660e6085a 100644
(file)
--- a/
lib/memcached_auto.c
+++ b/
lib/memcached_auto.c
@@
-20,15
+20,11
@@
static memcached_return memcached_auto(memcached_st *ptr,
send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
"%s %.*s %u\r\n", verb,
send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
"%s %.*s %u\r\n", verb,
- key_length, key,
+
(int)
key_length, key,
offset);
offset);
- if ((send(ptr->hosts[server_key].fd, buffer, send_length, 0) == -1))
- {
- fprintf(stderr, "failed set on %.*s TCP\n", key_length+1, key);
-
+ if ((write(ptr->hosts[server_key].fd, buffer, send_length) == -1))
return MEMCACHED_WRITE_FAILURE;
return MEMCACHED_WRITE_FAILURE;
- }
memset(buffer, 0, MEMCACHED_DEFAULT_COMMAND_SIZE);
send_length= read(ptr->hosts[server_key].fd, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE);
memset(buffer, 0, MEMCACHED_DEFAULT_COMMAND_SIZE);
send_length= read(ptr->hosts[server_key].fd, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE);