kdb: Const qualifier for kdb_getstr's prompt argument
All current callers of kdb_getstr() can pass constant pointers via the prompt argument. This patch adds a const qualification to make explicit the fact that this is safe. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
This commit is contained in:

committed by
Jason Wessel

parent
fb6daa7520
commit
32d375f6f2
@@ -439,7 +439,7 @@ poll_again:
|
||||
* substituted for %d, %x or %o in the prompt.
|
||||
*/
|
||||
|
||||
char *kdb_getstr(char *buffer, size_t bufsize, char *prompt)
|
||||
char *kdb_getstr(char *buffer, size_t bufsize, const char *prompt)
|
||||
{
|
||||
if (prompt && kdb_prompt_str != prompt)
|
||||
strncpy(kdb_prompt_str, prompt, CMD_BUFLEN);
|
||||
|
Reference in New Issue
Block a user