summaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-01-19 05:45:16 +0000
committerAndrew Cagney <cagney@redhat.com>2001-01-19 05:45:16 +0000
commit39805d25c444186cd3696fbbc3f27cdfc3f0beb8 (patch)
tree48510186db066a7baa9f8a9deca4c7e3d6d12652 /gdb/varobj.c
parentf2a02fff5eb970e88e15a52d3fd9efacee0f94ee (diff)
downloadgdb-39805d25c444186cd3696fbbc3f27cdfc3f0beb8.tar.gz
Replace FREEIF() with xfree().
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 4adfd688850..ae024a4cebd 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -391,11 +391,6 @@ static int rootcount = 0; /* number of root varobjs in the list */
/* Pointer to the varobj hash table (built at run time) */
static struct vlist **varobj_table;
-#if defined(FREEIF)
-#undef FREEIF
-#endif
-#define FREEIF(x) if (x != NULL) free((char *) (x))
-
/* Is the variable X one of our "fake" children? */
#define CPLUS_FAKE_CHILD(x) \
((x) != NULL && (x)->type == NULL && (x)->value == NULL)
@@ -788,7 +783,7 @@ varobj_set_value (struct varobj *var, char *expression)
if (!gdb_evaluate_expression (exp, &value))
{
/* We cannot proceed without a valid expression. */
- FREEIF (exp);
+ xfree (exp);
return 0;
}
@@ -1353,12 +1348,12 @@ free_variable (struct varobj *var)
if (var->root->rootvar == var)
{
free_current_contents ((char **) &var->root->exp);
- FREEIF (var->root);
+ xfree (var->root);
}
- FREEIF (var->name);
- FREEIF (var->obj_name);
- FREEIF (var);
+ xfree (var->name);
+ xfree (var->obj_name);
+ xfree (var);
}
static void