Change valid_user_defined_cmd_name_p to return bool
authorTom Tromey <tom@tromey.com>
Mon, 22 Apr 2019 02:10:51 +0000 (20:10 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 4 May 2019 20:13:27 +0000 (14:13 -0600)
This changes valid_user_defined_cmd_name_p to return bool.

gdb/ChangeLog
2019-05-04  Tom Tromey  <tom@tromey.com>

* cli/cli-decode.c (valid_user_defined_cmd_name_p): Return bool.
* command.h (valid_user_defined_cmd_name_p): Channge return type.

gdb/ChangeLog
gdb/cli/cli-decode.c
gdb/command.h

index 7eb5d9aef31d8d3e665579da93ae928be6b3af08..aa55b77b37f9b68aaf612d082469d7a9af892d3d 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-04  Tom Tromey  <tom@tromey.com>
+
+       * cli/cli-decode.c (valid_user_defined_cmd_name_p): Return bool.
+       * command.h (valid_user_defined_cmd_name_p): Channge return type.
+
 2019-05-04  Raul Tambre  <raul@tambre.ee>
 
        * python/lib/gdb/prompt.py (_ExtendedPrompt)
index 50430953c72fe7af326cdbebebe1aa5012ea2c78..72e2a970097e26579f6c07bf0c96d9bffcc753fc 100644 (file)
@@ -1328,13 +1328,13 @@ find_command_name_length (const char *text)
    This is a stricter subset of all gdb commands,
    see find_command_name_length.  */
 
-int
+bool
 valid_user_defined_cmd_name_p (const char *name)
 {
   const char *p;
 
   if (*name == '\0')
-    return FALSE;
+    return false;
 
   /* Alas "42" is a legitimate user-defined command.
      In the interests of not breaking anything we preserve that.  */
@@ -1346,10 +1346,10 @@ valid_user_defined_cmd_name_p (const char *name)
          || *p == '_')
        ; /* Ok.  */
       else
-       return FALSE;
+       return false;
     }
 
-  return TRUE;
+  return true;
 }
 
 /* This routine takes a line of TEXT and a CLIST in which to start the
index 4a239a71965d0e164f8fdefeb27af5cbc49da530..35006cc339e8c95dc836602a9049aebbcd0f3e12 100644 (file)
@@ -133,7 +133,7 @@ extern struct cli_suppress_notification cli_suppress_notification;
 
 /* API to the manipulation of command lists.  */
 
-extern int valid_user_defined_cmd_name_p (const char *name);
+extern bool valid_user_defined_cmd_name_p (const char *name);
 
 /* Const-correct variant of the above.  */
 
This page took 0.032002 seconds and 4 git commands to generate.