X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fzookeeper.c;h=84174853d24c62bd8ba22aaa17bc28e5f68aaa3d;hb=4f4ad5dd93776f330a0fb28fbece7157108e0c4c;hp=a3b73628bdc44d76db44f73a91d475c97fbb552d;hpb=cd5c60931ef73c6c34be6dcf58538b069be17c58;p=collectd.git diff --git a/src/zookeeper.c b/src/zookeeper.c index a3b73628..84174853 100644 --- a/src/zookeeper.c +++ b/src/zookeeper.c @@ -25,6 +25,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -105,7 +106,6 @@ static int zookeeper_connect (void) { int sk = -1; int status; - struct addrinfo *ai; struct addrinfo *ai_list; const char *host; const char *port; @@ -129,7 +129,7 @@ static int zookeeper_connect (void) return (-1); } - for (ai = ai_list; ai != NULL; ai = ai->ai_next) + for (struct addrinfo *ai = ai_list; ai != NULL; ai = ai->ai_next) { sk = socket (ai->ai_family, SOCK_STREAM, 0); if (sk < 0)