diff options
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r-- | libglusterfs/src/common-utils.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index b883653bf70..4371888d034 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -131,7 +131,13 @@ extern char *gf_mgmt_list[GF_MGMT_MAXVALUE]; #define GF_FILE_CONTENT_REQUESTED(_xattr_req,_content_limit) \ (dict_get_uint64 (_xattr_req, "glusterfs.content", _content_limit) == 0) -#define GF_ASSERT(x) assert (x); +#define GF_ASSERT(x) \ + do { \ + if (!(x)) { \ + gf_log_callingfn ("", GF_LOG_ERROR, \ + "Assertion failed: " #x); \ + } \ + } while (0); static inline void iov_free (struct iovec *vector, int count) |