diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-23 02:08:40 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-23 02:08:40 -0800 |
| commit | 229d4c7decb71fd607aaec14ecbae81e380cc700 (patch) | |
| tree | f35cef9f46113d86a6b33d04c188bbdb948cf150 /src/core/msgqueue.c | |
| parent | 471a454900ab6142e5a3c1f53866996172d2aad4 (diff) | |
| download | nng-229d4c7decb71fd607aaec14ecbae81e380cc700.tar.gz nng-229d4c7decb71fd607aaec14ecbae81e380cc700.tar.bz2 nng-229d4c7decb71fd607aaec14ecbae81e380cc700.zip | |
Uncrustify fixes.
Diffstat (limited to 'src/core/msgqueue.c')
| -rw-r--r-- | src/core/msgqueue.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/msgqueue.c b/src/core/msgqueue.c index fd89b7ad..859c0bd9 100644 --- a/src/core/msgqueue.c +++ b/src/core/msgqueue.c @@ -20,12 +20,12 @@ struct nni_msgqueue { nni_cond mq_writeable; nni_cond mq_drained; int mq_cap; - int mq_alloc; // alloc is cap + 2... + int mq_alloc; // alloc is cap + 2... int mq_len; int mq_get; int mq_put; int mq_closed; - int mq_rwait; // readers waiting (unbuffered) + int mq_rwait; // readers waiting (unbuffered) nni_msg ** mq_msgs; }; @@ -146,12 +146,14 @@ nni_msgqueue_put_impl(nni_msgqueue *mq, nni_msg *msg, } // room in the queue? - if (mq->mq_len < mq->mq_cap) + if (mq->mq_len < mq->mq_cap) { break; + } // unbuffered, room for one, and a reader waiting? - if (mq->mq_rwait && (mq->mq_len == mq->mq_cap)) + if (mq->mq_rwait && (mq->mq_len == mq->mq_cap)) { break; + } // interrupted? if (*signal) { |
