X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fzookeeper.c;h=860e93d768e927dffa81a18a614f9cabda82bb42;hb=290741f2e6de9e9b467463c1f0c6f031c4036428;hp=539795c0321563ea8a1179a50470bc4dde28453a;hpb=7531a36086295c02ccb2d78c41d355a424426607;p=collectd.git diff --git a/src/zookeeper.c b/src/zookeeper.c index 539795c0..860e93d7 100644 --- a/src/zookeeper.c +++ b/src/zookeeper.c @@ -108,10 +108,10 @@ static int zookeeper_connect (void) struct addrinfo ai_hints; struct addrinfo *ai; struct addrinfo *ai_list; - char *host; - char *port; + const char *host; + const char *port; - memset ((void *) &ai_hints, '\0', sizeof (ai_hints)); + memset (&ai_hints, '\0', sizeof (ai_hints)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_STREAM; @@ -159,8 +159,7 @@ static int zookeeper_connect (void) 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();