From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22433 invoked by alias); 8 May 2014 18:47:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22419 invoked by uid 89); 8 May 2014 18:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 May 2014 18:47:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s48IlG7G011058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 8 May 2014 14:47:16 -0400 Received: from barimba.redhat.com (ovpn-113-185.phx2.redhat.com [10.3.113.185]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s48Il38B005237; Thu, 8 May 2014 14:47:16 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/2] minor cleanups in is_dynamic_type Date: Thu, 08 May 2014 18:47:00 -0000 Message-Id: <1399574816-12845-2-git-send-email-tromey@redhat.com> In-Reply-To: <1399574816-12845-1-git-send-email-tromey@redhat.com> References: <1399574816-12845-1-git-send-email-tromey@redhat.com> X-SW-Source: 2014-05/txt/msg00096.txt.bz2 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 * 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