From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH 1/2] minor cleanups in is_dynamic_type
Date: Thu, 08 May 2014 18:47:00 -0000 [thread overview]
Message-ID: <1399574816-12845-2-git-send-email-tromey@redhat.com> (raw)
In-Reply-To: <1399574816-12845-1-git-send-email-tromey@redhat.com>
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-05-08 Tom Tromey <tromey@redhat.com>
* gdbtypes.c (is_dynamic_type): Remove unneeded "break"s.
---
gdb/ChangeLog | 4 ++++
gdb/gdbtypes.c | 10 +++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 8e6631a..95b861e 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 *
--
1.9.0
prev parent reply other threads:[~2014-05-08 18:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 18:47 [PATCH 0/2] VLA in a struct or union Tom Tromey
2014-05-08 18:47 ` [PATCH 2/2] handle " Tom Tromey
2014-05-08 19:01 ` pinskia
2014-05-08 19:07 ` Tom Tromey
2014-05-08 20:30 ` Philippe Waroquiers
2014-05-08 21:32 ` Tom Tromey
2014-05-08 21:09 ` Joel Brobecker
2014-05-08 21:33 ` Tom Tromey
2014-05-08 22:38 ` Joel Brobecker
2014-05-09 15:57 ` Joel Brobecker
2014-05-21 17:28 ` Tom Tromey
2014-05-21 18:24 ` Joel Brobecker
2014-05-21 22:02 ` Joel Brobecker
2014-05-21 22:28 ` Tom Tromey
2014-06-04 20:27 ` Tom Tromey
2014-05-09 8:05 ` Agovic, Sanimir
2014-05-09 21:08 ` Tom Tromey
2014-05-12 15:37 ` Agovic, Sanimir
2014-05-12 17:00 ` Tom Tromey
2014-05-13 7:53 ` Agovic, Sanimir
2014-05-08 18:47 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399574816-12845-2-git-send-email-tromey@redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox