aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-05-08 10:10:43 -0600
committerTom Tromey <tromey@redhat.com>2014-06-04 14:28:20 -0600
commit92e2a17f9b145d35b4a9a2273612d323ccdc9cac (patch)
tree903ba0ef7257a3236c5273e3693c004d0fb01f7f
parentc0939df1ce443e82c44188ff988acbb45780bfd7 (diff)
downloadgdb-92e2a17f9b145d35b4a9a2273612d323ccdc9cac.zip
gdb-92e2a17f9b145d35b4a9a2273612d323ccdc9cac.tar.gz
gdb-92e2a17f9b145d35b4a9a2273612d323ccdc9cac.tar.bz2
minor cleanups in is_dynamic_type
I noticed that gdbtypes.c:is_dynamic_type has some unneeded "break"s. This patch cleans up the function a bit, removing those and removing the switch's default case so that the end of the function is a bit clearer. 2014-06-04 Tom Tromey <tromey@redhat.com> * gdbtypes.c (is_dynamic_type): Remove unneeded "break"s.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/gdbtypes.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8e48f1f..ba04857 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2014-06-04 Tom Tromey <tromey@redhat.com>
+ * gdbtypes.c (is_dynamic_type): Remove unneeded "break"s.
+
+2014-06-04 Tom Tromey <tromey@redhat.com>
+
* procfs.c (procfs_attach): Make "args" const.
* windows-nat.c (windows_attach): Make "args" const.
* nto-procfs.c (procfs_attach): Make "args" const.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 0d7b793..ba35883 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1625,7 +1625,6 @@ is_dynamic_type (struct type *type)
{
case TYPE_CODE_RANGE:
return !has_static_range (TYPE_RANGE_DATA (type));
- break;
case TYPE_CODE_ARRAY:
{
@@ -1635,14 +1634,11 @@ is_dynamic_type (struct type *type)
or the elements it contains have a dynamic contents. */
if (is_dynamic_type (TYPE_INDEX_TYPE (type)))
return 1;
- else
- return is_dynamic_type (TYPE_TARGET_TYPE (type));
- break;
+ return is_dynamic_type (TYPE_TARGET_TYPE (type));
}
- default:
- return 0;
- break;
}
+
+ return 0;
}
static struct type *