projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils_cache_mock: fix annotations
[collectd.git]
/
src
/
memcached.c
diff --git
a/src/memcached.c
b/src/memcached.c
index
4e7b143
..
54e3a19
100644
(file)
--- a/
src/memcached.c
+++ b/
src/memcached.c
@@
-52,8
+52,9
@@
typedef struct memcached_s memcached_t;
static _Bool memcached_have_instances = 0;
static _Bool memcached_have_instances = 0;
-static void memcached_free (
memcached_t *st
)
+static void memcached_free (
void *arg
)
{
{
+ memcached_t *st = arg;
if (st == NULL)
return;
if (st == NULL)
return;
@@
-173,8
+174,7
@@
static int memcached_connect (memcached_t *st)
static int memcached_query_daemon (char *buffer, size_t buffer_size, memcached_t *st)
{
static int memcached_query_daemon (char *buffer, size_t buffer_size, memcached_t *st)
{
- int fd = -1;
- int status;
+ int fd, status;
size_t buffer_fill;
fd = memcached_connect (st);
size_t buffer_fill;
fd = memcached_connect (st);
@@
-557,7
+557,7
@@
static int memcached_add_read_callback (memcached_t *st)
memset (&ud, 0, sizeof (ud));
ud.data = st;
memset (&ud, 0, sizeof (ud));
ud.data = st;
- ud.free_func =
(void *)
memcached_free;
+ ud.free_func = memcached_free;
assert (st->name != NULL);
ssnprintf (callback_name, sizeof (callback_name), "memcached/%s", st->name);
assert (st->name != NULL);
ssnprintf (callback_name, sizeof (callback_name), "memcached/%s", st->name);