projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
grpc plugin: Create a "Dispatch" service and use streaming RPCs.
[collectd.git]
/
src
/
zookeeper.c
diff --git
a/src/zookeeper.c
b/src/zookeeper.c
index
539795c
..
a236c8a
100644
(file)
--- a/
src/zookeeper.c
+++ b/
src/zookeeper.c
@@
-105,13
+105,12
@@
static int zookeeper_connect (void)
{
int sk = -1;
int status;
{
int sk = -1;
int status;
- struct addrinfo ai_hints;
+ struct addrinfo ai_hints
= { 0 }
;
struct addrinfo *ai;
struct addrinfo *ai_list;
struct addrinfo *ai;
struct addrinfo *ai_list;
- char *host;
- char *port;
+ c
onst c
har *host;
+ c
onst c
har *port;
- memset ((void *) &ai_hints, '\0', sizeof (ai_hints));
ai_hints.ai_family = AF_UNSPEC;
ai_hints.ai_socktype = SOCK_STREAM;
ai_hints.ai_family = AF_UNSPEC;
ai_hints.ai_socktype = SOCK_STREAM;
@@
-159,8
+158,7
@@
static int zookeeper_connect (void)
static int zookeeper_query (char *buffer, size_t buffer_size)
{
static int zookeeper_query (char *buffer, size_t buffer_size)
{
- int sk = -1;
- int status;
+ int sk, status;
size_t buffer_fill;
sk = zookeeper_connect();
size_t buffer_fill;
sk = zookeeper_connect();