From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19671 invoked by alias); 15 Jan 2013 09:35:35 -0000 Received: (qmail 19641 invoked by uid 22791); 15 Jan 2013 09:35:34 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Jan 2013 09:35:30 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Tv2vZ-0001JX-Bc from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 15 Jan 2013 01:35:29 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 15 Jan 2013 01:35:29 -0800 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Tue, 15 Jan 2013 01:35:27 -0800 From: Yao Qi To: Subject: [PATCH] Remove redundant condition checking. Date: Tue, 15 Jan 2013 09:35:00 -0000 Message-ID: <1358242481-16288-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes 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 X-SW-Source: 2013-01/txt/msg00301.txt.bz2 Hi, Just find here is another redundant checking, if (lwp->bp_reinsert != 0) <-- [1] { if (debug_threads) fprintf (stderr, " pending reinsert at 0x%s\n", paddress (lwp->bp_reinsert)); if (lwp->bp_reinsert != 0 && can_hardware_single_step ()) <-- [2] This patch is to remove the redundant one in [2]. gdb/gdbserver: 2013-01-15 Yao Qi * linux-low.c (linux_resume_one_lwp): Don't check '(lwp->bp_reinsert != 0'. --- gdb/gdbserver/linux-low.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 89988eb..8988509 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -3192,7 +3192,7 @@ linux_resume_one_lwp (struct lwp_info *lwp, fprintf (stderr, " pending reinsert at 0x%s\n", paddress (lwp->bp_reinsert)); - if (lwp->bp_reinsert != 0 && can_hardware_single_step ()) + if (can_hardware_single_step ()) { if (fast_tp_collecting == 0) { -- 1.7.7.6