Github user enixon commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/547#discussion_r200194341
--- Diff: src/c/src/zookeeper.c ---
@@ -4358,7 +4358,9 @@ static const char* format_endpoint_info(const struct
sockaddr_storage* ep)
{
static char buf[128] = { 0 };
char addrstr[128] = { 0 };
+ const char *fmtstring;
void *inaddr;
+ char is_inet6 = 0; // poor man's boolean
--- End diff --
Continuity of style.
There are no usages of `bool` in the c client yet, probably a legacy of the
time it was written. Usually an `int` is used (see
`disable_reconnection_attempt` in zk_adaptor.h) which is why I copied that
convention in my first pass. Other times a `char` is used (see
`allow_read_only` in zk_adaptor.h) and as that is slightly more efficient, I
was happy to change to it.
---