[PATCH] Make n_spaces return a const char *
Tom Tromey
tom@tromey.com
Mon Dec 20 16:04:22 GMT 2021
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> n_spaces keeps the spaces in a static buffer. If a caller overwrites
Tom> these, it may give an incorrect result to a subsequent caller. So,
Tom> make the return type const to help avoid this outcome.
I'm checking this in now.
Sometimes I wonder if we want to split these utility things into
separate files and put them in gdbsupport.
Tom
More information about the Gdb-patches
mailing list