aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-27 20:46:06 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-27 20:46:06 -0800
commit9c8576a3f0357e611c0892dfe1d0d4c2afe73bf2 (patch)
treedeae8b9e858a74dd3aa1e54dd8db3e4d36042b0e /src/core
parent57d3302e661f155a681eb9683eb53bf30e348b4b (diff)
downloadnng-9c8576a3f0357e611c0892dfe1d0d4c2afe73bf2.tar.gz
nng-9c8576a3f0357e611c0892dfe1d0d4c2afe73bf2.tar.bz2
nng-9c8576a3f0357e611c0892dfe1d0d4c2afe73bf2.zip
Message allocation fixed. Comparison was backwards.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/message.c b/src/core/message.c
index 6976f4da..b07d107f 100644
--- a/src/core/message.c
+++ b/src/core/message.c
@@ -90,7 +90,7 @@ nni_chunk_grow(nni_chunk *ch, size_t newsz, size_t headwanted)
// We either don't have a data pointer yet, or it doesn't reference
// the backing store. In this case, we just check against the
// allocated capacity and grow, or don't grow.
- if (newsz > ch->ch_cap) {
+ if (newsz < ch->ch_cap) {
// Enough space at end, so just use it.
if (ch->ch_ptr == NULL) {
ch->ch_ptr = ch->ch_buf + headwanted;