This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFA 49/67] Constify some commands in btrace.c


> -----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 <tom@tromey.com>
> Subject: [RFA 49/67] Constify some commands in btrace.c

Hello Tom,

> ChangeLog
> 2017-09-20  Tom Tromey  <tom@tromey.com>
> 
> 	* 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);
> 
> -  return strtol (pos, arg, 10);
> +  char *end;
> +  long result = strtol (pos, &end, 10);
> +  *arg = end;
> +  return result;
>  }

The rest of the declarations are at the beginning.  I'd prefer to keep it that 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]