From b4d3ff2d460607ba8e1b351233cb6cbe9f031264 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 29 Dec 2019 14:39:27 -0800 Subject: fixes #1064 Potential deadlock in statistics code fixes #1063 Include sanitizer runs in CI fixes #1068 Wssfile test sometimes fails with wrong error code While here, addressed a number of clang-tidy items, and some light cleanup of code we were already in. --- src/protocol/pair1/pair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/protocol/pair1') diff --git a/src/protocol/pair1/pair.c b/src/protocol/pair1/pair.c index 7adb8bd8..70654d6d 100644 --- a/src/protocol/pair1/pair.c +++ b/src/protocol/pair1/pair.c @@ -22,7 +22,7 @@ #define NNI_PROTO_PAIR_V1 NNI_PROTO(1, 1) #endif -#define BUMPSTAT(x) nni_stat_inc_atomic(x, 1) +#define BUMP_STAT(x) nni_stat_inc_atomic(x, 1) typedef struct pair1_pipe pair1_pipe; typedef struct pair1_sock pair1_sock; @@ -199,7 +199,7 @@ pair1_pipe_start(void *arg) nni_mtx_lock(&s->mtx); if (nni_pipe_peer(p->npipe) != NNI_PROTO_PAIR_V1) { nni_mtx_unlock(&s->mtx); - BUMPSTAT(&s->stat_rejmismatch); + BUMP_STAT(&s->stat_rejmismatch); // Peer protocol mismatch. return (NNG_EPROTO); } @@ -213,7 +213,7 @@ pair1_pipe_start(void *arg) if (!nni_list_empty(&s->plist)) { nni_idhash_remove(s->pipes, id); nni_mtx_unlock(&s->mtx); - BUMPSTAT(&s->stat_rejinuse); + BUMP_STAT(&s->stat_rejinuse); return (NNG_EBUSY); } } else { -- cgit v1.2.3-70-g09d2