Add more assertions.

This commit is contained in:
Patrick Pelissier committed 2017-04-13 22:47:39 +02:00
1 parent d5bd3674d8
commit a5dac33524
1 file changed
+6 -2
+6 -2
View File
@@ -229,7 +229,9 @@
{ \
SHAREDI_CONTRACT(shared); \
assert(*shared != NULL); \
return M_C3(shared_, name, _const_cast) ((*shared)->data); \
type *data = (*shared)->data; \
assert (data != NULL); \
return M_C3(shared_, name, _const_cast) (data); \
} \
\
static inline type * \
@@ -237,7 +239,9 @@
{ \
SHAREDI_CONTRACT(shared); \
assert(*shared != NULL); \
return (*shared)->data; \
type *data = (*shared)->data; \
assert (data != NULL); \
return data; \
} \
/********************************** INTERNAL ************************************/