This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 35/67] Constify commands maint.c, plus maintenance_print_type
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Thu, 21 Sep 2017 11:06:51 +0100
- Subject: Re: [RFA 35/67] Constify commands maint.c, plus maintenance_print_type
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5D348A039D
- References: <20170921051023.19023-1-tom@tromey.com> <20170921051023.19023-36-tom@tromey.com>
On 09/21/2017 06:09 AM, Tom Tromey wrote:
>
> @@ -591,8 +583,7 @@ maintenance_do_deprecate (char *text, int deprecate)
> if (end_ptr != NULL)
> {
> len = end_ptr - start_ptr;
> - start_ptr[len] = '\0';
> - replacement = xstrdup (start_ptr);
> + replacement = savestring (start_ptr, len);
> }
This looks like another "command repeat" bug fix, right? Yay! :-)
(Please mention it in the commit log.)
Thanks,
Pedro Alves