diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-10-12 03:06:30 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-12 02:39:01 -0700 |
commit | 9bad9d59f0f19fe20f90c6ed80e25c7db08b3371 (patch) | |
tree | 05dc2622a1ab6e00930f3846bd79cf560e8a939e /libglusterfs/src/common-utils.h | |
parent | f637330995eab92a1d0b9f4ad9c43acfaad35037 (diff) |
Change assert to GF_ASSERT
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
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) |