From: Tom Tromey Date: Mon, 22 Apr 2019 02:21:36 +0000 (-0600) Subject: Change valid_command_p to return bool X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fe876770ad6739a5b3ca50f53dfcfbe433ba0fa;p=binutils-gdb.git Change valid_command_p to return bool This changes valid_command_p to return bool. gdb/ChangeLog 2019-05-04 Tom Tromey * cli/cli-cmds.c (valid_command_p): Return bool. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aa55b77b37f..17c9d886bd0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-05-04 Tom Tromey + + * cli/cli-cmds.c (valid_command_p): Return bool. + 2019-05-04 Tom Tromey * cli/cli-decode.c (valid_user_defined_cmd_name_p): Return bool. diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 5f3b973f060..3d8e2387ff7 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -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