mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:27:20 +08:00
Make n_spaces return a const char *
n_spaces keeps the spaces in a static buffer. If a caller overwrites these, it may give an incorrect result to a subsequent caller. So, make the return type const to help avoid this outcome.
This commit is contained in:
@ -2303,7 +2303,7 @@ puts_unfiltered (const char *string)
|
||||
|
||||
/* Return a pointer to N spaces and a null. The pointer is good
|
||||
until the next call to here. */
|
||||
char *
|
||||
const char *
|
||||
n_spaces (int n)
|
||||
{
|
||||
char *t;
|
||||
|
Reference in New Issue
Block a user