summaryrefslogtreecommitdiff
path: root/src/_assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/_assert.h')
-rw-r--r--src/_assert.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/_assert.h b/src/_assert.h
index edf3add0..5e472e89 100644
--- a/src/_assert.h
+++ b/src/_assert.h
@@ -28,18 +28,12 @@
} while (0)
#define ASSERT_REPRESENTABLE(_n, _min, _max, _type, _sentinel) do { \
- if (_sentinel && (_n != _sentinel && (_n < _min || _n > _max))) { \
+ if ((_n) != _sentinel && ((_n) < _min || (_n) > _max)) { \
struct __constraint_info _ci = {0}; \
_ci.func = __func__; \
__stdlib.constraint_handler("Undefined behavior: " \
"Parameter " #_n " must be representable as a " #_type \
" or be equal to " #_sentinel, &_ci, ERANGE); \
- } else if (_n < _min || _n > _max) { \
- struct __constraint_info _ci = {0}; \
- _ci.func = __func__; \
- __stdlib.constraint_handler("Undefined behavior: " \
- "Parameter " #_n " must be representable as a " #_type, \
- &_ci, ERANGE); \
} \
} while (0)
#else