From 9bad9d59f0f19fe20f90c6ed80e25c7db08b3371 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 12 Oct 2010 03:06:30 +0000 Subject: Change assert to GF_ASSERT Signed-off-by: Vijay Bellur Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- libglusterfs/src/common-utils.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/common-utils.h') 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) -- cgit