projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
First pass on updating docs.
[awesomized/libmemcached]
/
clients
/
memdump.c
diff --git
a/clients/memdump.c
b/clients/memdump.c
index 3654be2b0d3a9f529b15e83cdfcf0a764be85845..0e81dad491849f43c8b9b668b5f2cdd640bc3f63 100644
(file)
--- a/
clients/memdump.c
+++ b/
clients/memdump.c
@@
-43,10
+43,11
@@
static char *opt_username;
static char *opt_passwd;
/* Print the keys and counter how many were found */
static char *opt_passwd;
/* Print the keys and counter how many were found */
-static memcached_return_t key_printer(const memcached_st *ptr
__attribute__((unused))
,
+static memcached_return_t key_printer(const memcached_st *ptr,
const char *key, size_t key_length,
const char *key, size_t key_length,
- void *context
__attribute__((unused))
)
+ void *context)
{
{
+ (void)ptr;(void)context;
printf("%.*s\n", (uint32_t)key_length, key);
return MEMCACHED_SUCCESS;
printf("%.*s\n", (uint32_t)key_length, key);
return MEMCACHED_SUCCESS;
@@
-91,7
+92,7
@@
int main(int argc, char *argv[])
if (!initialize_sasl(memc, opt_username, opt_passwd))
{
memcached_free(memc);
if (!initialize_sasl(memc, opt_username, opt_passwd))
{
memcached_free(memc);
- return
1
;
+ return
EXIT_FAILURE
;
}
rc= memcached_dump(memc, callbacks, NULL, 1);
}
rc= memcached_dump(memc, callbacks, NULL, 1);
@@
-99,8
+100,8
@@
int main(int argc, char *argv[])
if (rc != MEMCACHED_SUCCESS)
{
fprintf(stderr, "memdump: memcache error %s", memcached_strerror(memc, rc));
if (rc != MEMCACHED_SUCCESS)
{
fprintf(stderr, "memdump: memcache error %s", memcached_strerror(memc, rc));
- if (memc
->cached_errno
)
- fprintf(stderr, " system error %s", strerror(memc
->cached_errno
));
+ if (memc
ached_last_error_errno(memc)
)
+ fprintf(stderr, " system error %s", strerror(memc
ached_last_error_errno(memc)
));
fprintf(stderr, "\n");
}
fprintf(stderr, "\n");
}
@@
-113,7
+114,7
@@
int main(int argc, char *argv[])
shutdown_sasl();
shutdown_sasl();
- return
0
;
+ return
EXIT_SUCCESS
;
}
static void options_parse(int argc, char *argv[])
}
static void options_parse(int argc, char *argv[])