[PATCH 1/2] Constify ada_encode return type
Tom Tromey
tromey@adacore.com
Wed Oct 7 18:26:05 GMT 2020
>> + const char *temp_name = ada_encode (name0.ptr);
>> + name_len = strlen (temp_name);
>> + encoded_name = obstack_strndup (&temp_parse_space, temp_name, name_len);
Simon> Could this be further simplified to:
Simon> encoded_name = obstack_strdup (&temp_parse_space, ada_encode (name0.ptr));
Simon> ?
name_len is used later in the function, so this would involve an extra
strlen.
Tom
More information about the Gdb-patches
mailing list