[FYI,2/7] Change valid_command_p to return bool
Commit Message
This changes valid_command_p to return bool.
gdb/ChangeLog
2019-05-04 Tom Tromey <tom@tromey.com>
* cli/cli-cmds.c (valid_command_p): Return bool.
---
gdb/ChangeLog | 4 ++++
gdb/cli/cli-cmds.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
@@ -1355,9 +1355,9 @@ argv_to_string (char **argv, int n)
}
/* Subroutine of alias_command to simplify it.
- Return TRUE if COMMAND exists, unambiguously. Otherwise FALSE. */
+ Return true if COMMAND exists, unambiguously. Otherwise false. */
-static int
+static bool
valid_command_p (const char *command)
{
struct cmd_list_element *c;
@@ -1365,7 +1365,7 @@ valid_command_p (const char *command)
c = lookup_cmd_1 (& command, cmdlist, NULL, 1);
if (c == NULL || c == (struct cmd_list_element *) -1)
- return FALSE;
+ return false;
/* This is the slightly tricky part.
lookup_cmd_1 will return a pointer to the last part of COMMAND