diff options
author | Michael Snyder <msnyder@specifix.com> | 2007-08-14 18:26:46 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2007-08-14 18:26:46 +0000 |
commit | 0ea588adf4f6418843c03f77a8d7a804456019dd (patch) | |
tree | 4e7c7e3a1f625aa64c2495ff9e50bbfaf30a2b60 /gdb | |
parent | 3d01b5e74c74ce9aea920e2b5efa0fb1a2b03748 (diff) | |
download | gdb-0ea588adf4f6418843c03f77a8d7a804456019dd.tar.gz |
2007-08-14 Michael Snyder <msnyder@access-company.com>
* varobj.c (cplus_describe_child): Guard against null.
Use "NULL" instead of "0" to initialize pointers.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/varobj.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 77c5a0f7558..dc4596d41ac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-08-14 Michael Snyder <msnyder@access-company.com> + + * varobj.c (cplus_describe_child): Guard against null. + Use "NULL" instead of "0" to initialize pointers. + 2007-08-14 Daniel Jacobowitz <dan@codesourcery.com> * arm-tdep.c (arm_gdbarch_init): Allow unknown ABI and FPU settings diff --git a/gdb/varobj.c b/gdb/varobj.c index dbeaff491a8..be6df5e8388 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -2315,7 +2315,7 @@ static void cplus_describe_child (struct varobj *parent, int index, char **cname, struct value **cvalue, struct type **ctype) { - char *name = 0; + char *name = NULL; struct value *value; struct type *type; @@ -2396,7 +2396,7 @@ cplus_describe_child (struct varobj *parent, int index, } else { - char *access = 0; + char *access = NULL; int children[3]; cplus_class_num_children (type, children); @@ -2435,7 +2435,8 @@ cplus_describe_child (struct varobj *parent, int index, /* error! */ break; } - + + gdb_assert (access); if (cname) *cname = xstrdup (access); |