summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/mem-pool.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-10-12 03:06:30 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-12 02:39:01 -0700
commit9bad9d59f0f19fe20f90c6ed80e25c7db08b3371 (patch)
tree05dc2622a1ab6e00930f3846bd79cf560e8a939e /libglusterfs/src/mem-pool.c
parentf637330995eab92a1d0b9f4ad9c43acfaad35037 (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/mem-pool.c')
-rw-r--r--libglusterfs/src/mem-pool.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 8f62ac3cf89..17d2e0dd2f1 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -78,15 +78,15 @@ gf_mem_set_acct_info (xlator_t *xl, char **alloc_ptr,
ptr = (char *) (*alloc_ptr);
if (!xl) {
- assert (0);
+ GF_ASSERT (0);
}
if (!(xl->mem_acct.rec)) {
- assert (0);
+ GF_ASSERT (0);
}
if (type > xl->mem_acct.num_types) {
- assert (0);
+ GF_ASSERT (0);
}
LOCK(&xl->mem_acct.rec[type].lock);
@@ -179,7 +179,7 @@ __gf_realloc (void *ptr, size_t size)
orig_ptr = (char *)ptr - 4;
- assert (*(uint32_t *)orig_ptr == GF_MEM_HEADER_MAGIC);
+ GF_ASSERT (*(uint32_t *)orig_ptr == GF_MEM_HEADER_MAGIC);
orig_ptr = orig_ptr - sizeof(xlator_t *);
xl = *((xlator_t **)orig_ptr);
@@ -261,7 +261,7 @@ __gf_free (void *free_ptr)
if (GF_MEM_HEADER_MAGIC != *(uint32_t *)ptr) {
//Possible corruption, assert here
- assert (0);
+ GF_ASSERT (0);
}
*(uint32_t *)ptr = 0;
@@ -271,7 +271,7 @@ __gf_free (void *free_ptr)
if (!xl) {
//gf_free expects xl to be available
- assert (0);
+ GF_ASSERT (0);
}
if (!xl->mem_acct.rec) {
@@ -288,7 +288,7 @@ __gf_free (void *free_ptr)
if (GF_MEM_TRAILER_MAGIC != *(uint32_t *)
((char *)free_ptr + req_size)) {
// This points to a memory overrun
- assert (0);
+ GF_ASSERT (0);
}
*(uint32_t *) ((char *)free_ptr + req_size) = 0;