aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-01-11 13:15:40 -0800
committerGarrett D'Amore <garrett@damore.org>2020-01-11 14:15:37 -0800
commit6d92c73e5cdf93fe70b0646e78a250e01a8d2f65 (patch)
treecb14648b92b02e17bcb48f41a623009cdd65e0ab /src/core/defs.h
parent516b99946aad5da15020de9d7175d44c12fd14c6 (diff)
downloadnng-6d92c73e5cdf93fe70b0646e78a250e01a8d2f65.tar.gz
nng-6d92c73e5cdf93fe70b0646e78a250e01a8d2f65.tar.bz2
nng-6d92c73e5cdf93fe70b0646e78a250e01a8d2f65.zip
XREQ and others race on TTL.
The TTL in these cases should have been atomic. To facilitate things we actually introduce an atomic int for convenience. We also introduce a convenience nni_msg_must_append_u32() and nni_msg_header_must_append_u32(), so that we can eliminate some failure tests that cannot ever happen. Combined with a new test for xreq, we have 100% coverage for xreq and more coverage for the other REQ/REP protocols.
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index 0e0deac2..9e320e1d 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -23,7 +23,7 @@
if (!(x)) \
nni_panic("%s: %d: assert err: %s", __FILE__, __LINE__, #x)
#else
-#define NNI_ASSERT(x)
+#define NNI_ASSERT(x) (0)
#endif
// Returns the size of an array in elements. (Convenience.)