X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fzookeeper.c;h=860e93d768e927dffa81a18a614f9cabda82bb42;hb=8391a4430d5dffea44898adb628a5bcdbcfe31ba;hp=539795c0321563ea8a1179a50470bc4dde28453a;hpb=928e57746b4f67981318b7a4161a3ddd54d2b1a3;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();