From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93217 invoked by alias); 21 Sep 2017 07:02:53 -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 93064 invoked by uid 89); 21 Sep 2017 07:02:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1454 X-HELO: mga03.intel.com Received: from mga03.intel.com (HELO mga03.intel.com) (134.134.136.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Sep 2017 07:02:50 +0000 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2017 00:02:46 -0700 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2017 00:02:45 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.248]) by IRSMSX102.ger.corp.intel.com ([169.254.2.180]) with mapi id 14.03.0319.002; Thu, 21 Sep 2017 08:02:44 +0100 From: "Metzger, Markus T" To: Tom Tromey , "gdb-patches@sourceware.org" Subject: RE: [RFA 49/67] Constify some commands in btrace.c Date: Thu, 21 Sep 2017 07:02:00 -0000 Message-ID: References: <20170921051023.19023-1-tom@tromey.com> <20170921051023.19023-50-tom@tromey.com> In-Reply-To: <20170921051023.19023-50-tom@tromey.com> dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00604.txt.bz2 > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Tom Tromey > Sent: Thursday, September 21, 2017 7:10 AM > To: gdb-patches@sourceware.org > Cc: Tom Tromey > Subject: [RFA 49/67] Constify some commands in btrace.c Hello Tom, > ChangeLog > 2017-09-20 Tom Tromey >=20 > * btrace.c (get_uint, get_context_size, no_chunk) > (maint_btrace_packet_history_cmd) > (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd) > (maint_info_btrace_cmd): Constify. > --- > gdb/ChangeLog | 7 +++++++ > gdb/btrace.c | 24 ++++++++++++++---------- > 2 files changed, 21 insertions(+), 10 deletions(-) Looks good to me. > @@ -3213,13 +3214,16 @@ get_context_size (char **arg) > if (!isdigit (*pos)) > error (_("Expected positive number, got: %s."), pos); >=20 > - return strtol (pos, arg, 10); > + char *end; > + long result =3D strtol (pos, &end, 10); > + *arg =3D end; > + return result; > } The rest of the declarations are at the beginning. I'd prefer to keep it t= hat way. Thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928