| diff --git a/src/c/src/mt_adaptor.c b/src/c/src/mt_adaptor.c |
| index 7dc7878..9c62991 100644 |
| --- a/src/c/src/mt_adaptor.c |
| +++ b/src/c/src/mt_adaptor.c |
| @@ -483,13 +483,7 @@ int32_t inc_ref_counter(zhandle_t* zh,int i) |
| int32_t fetch_and_add(volatile int32_t* operand, int incr) |
| { |
| #ifndef WIN32 |
| - int32_t result; |
| - asm __volatile__( |
| - "lock xaddl %0,%1\n" |
| - : "=r"(result), "=m"(*(int *)operand) |
| - : "0"(incr) |
| - : "memory"); |
| - return result; |
| + return __sync_fetch_and_add(operand, incr); |
| #else |
| volatile int32_t result; |
| _asm |
| From 4343ef1db40ebe2a744326000eff725deb55f97f Mon Sep 17 00:00:00 2001 |
| From: Kapil Arya <kapil@mesosphere.io> |
| Date: Thu, 16 Aug 2018 15:53:53 -0400 |
| Subject: [PATCH] Backported a format error fix. |
| |
| This patch backports https://github.com/apache/zookeeper/pull/559. |
| --- |
| src/c/src/zookeeper.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c |
| index 1ba90afa..a4c28e36 100644 |
| --- a/src/c/src/zookeeper.c |
| +++ b/src/c/src/zookeeper.c |
| @@ -3440,7 +3440,7 @@ int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert, |
| static const char* format_endpoint_info(const struct sockaddr_storage* ep) |
| { |
| static char buf[128]; |
| - char addrstr[128]; |
| + char addrstr[INET6_ADDRSTRLEN]; |
| void *inaddr; |
| #ifdef WIN32 |
| char * addrstring; |
| -- |
| 2.18.0 |