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
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> 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);
>> }
Pedro> This looks like another "command repeat" bug fix, right? Yay! :-)
I hadn't noticed :)
Pedro> (Please mention it in the commit log.)
I added this to the commit message:
In addition to the constification, this fixes a command-repeat bug.
Tom