diff options
author | Csaba Henk <csaba@gluster.com> | 2011-05-26 03:32:25 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-26 08:55:13 -0700 |
commit | 3435813379c276c3c020cb4e3942554be0040ecc (patch) | |
tree | 176a4968eab461b211d31243d84f98443bc32a5f /libglusterfs/src/trie.c | |
parent | 6ff690a54ea7d26089be29470e499292971dd30e (diff) |
libglusterfs: clean up memory types
Unify them in one header, weed out overlap.
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2562 (invoke external commands precisely with fork + exec)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2562
Diffstat (limited to 'libglusterfs/src/trie.c')
-rw-r--r-- | libglusterfs/src/trie.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libglusterfs/src/trie.c b/libglusterfs/src/trie.c index 2501e71a540..758e068c324 100644 --- a/libglusterfs/src/trie.c +++ b/libglusterfs/src/trie.c @@ -23,7 +23,6 @@ #include <ctype.h> #include "common-utils.h" -#include "trie-mem-types.h" #include "trie.h" #define DISTANCE_EDIT 1 @@ -53,7 +52,7 @@ trie_new () { trie_t *trie = NULL; - trie = GF_CALLOC (1, sizeof (*trie), gf_trie_mt_trie); + trie = GF_CALLOC (1, sizeof (*trie), gf_common_mt_trie_trie); if (!trie) return NULL; @@ -70,7 +69,8 @@ trie_subnode (trienode_t *node, int id) subnode = node->subnodes[id]; if (!subnode) { - subnode = GF_CALLOC (1, sizeof (*subnode), gf_trie_mt_node); + subnode = GF_CALLOC (1, sizeof (*subnode), + gf_common_mt_trie_node); if (!subnode) return NULL; @@ -202,7 +202,7 @@ trienode_get_word (trienode_t *node, char **bufp) { char *buf = NULL; - buf = GF_CALLOC (1, node->depth + 1, gf_trie_mt_buf); + buf = GF_CALLOC (1, node->depth + 1, gf_common_mt_trie_buf); if (!buf) return -1; *bufp = buf; @@ -226,7 +226,8 @@ calc_dist (trienode_t *node, void *data) word = data; - node->data = GF_CALLOC (node->trie->len, sizeof (int), gf_trie_mt_data); + node->data = GF_CALLOC (node->trie->len, sizeof (int), + gf_common_mt_trie_data); if (!node->data) return -1; row = node->data; |