From patchwork Sun Jan 6 22:46:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 30979 Received: (qmail 43013 invoked by alias); 6 Jan 2019 22:46:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 42977 invoked by uid 89); 6 Jan 2019 22:46:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:958 X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.186.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 06 Jan 2019 22:46:39 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 6FDDA400C5D8C for ; Sun, 6 Jan 2019 15:58:34 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id gHBmgKrJ22PzOgHBmg01EA; Sun, 06 Jan 2019 16:46:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hHWRx0nowlT96hBKZ8eBFxm3JFK0S7zxUNAifdDM48I=; b=KOAlYPudg2cKsJmr8obTC2rs6g Xa5+CG14qWW+CcDXGNPyrsKuyuWrAdN/W5LLne0An4vg2QwBbl3xyZJCym5ZtD2zwqyXTWpPEXpBH 5bbXye8O1cEjMhtp6Qpph9S3M; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:38864 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1ggHBm-001jE9-8w; Sun, 06 Jan 2019 16:46:38 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 2/3] Constify remote_console_output Date: Sun, 6 Jan 2019 15:46:35 -0700 Message-Id: <20190106224636.5271-3-tom@tromey.com> In-Reply-To: <20190106224636.5271-1-tom@tromey.com> References: <20190106224636.5271-1-tom@tromey.com> This constifies the parameter to remote_console_output. 2019-01-06 Tom Tromey * remote.c (remote_console_output): Make parameter const. --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index c40f926376..6b5870a70a 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1024,7 +1024,7 @@ static void remote_async_inferior_event_handler (gdb_client_data); static bool remote_read_description_p (struct target_ops *target); -static void remote_console_output (char *msg); +static void remote_console_output (const char *msg); static void remote_btrace_reset (remote_state *rs); @@ -6799,9 +6799,9 @@ remote_target::terminal_ours () } static void -remote_console_output (char *msg) +remote_console_output (const char *msg) { - char *p; + const char *p; for (p = msg; p[0] && p[1]; p += 2) {