gdb: Make startswith return a bool
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 19 Oct 2019 21:00:35 +0000 (17:00 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 19 Oct 2019 21:01:09 +0000 (17:01 -0400)
gdb/ChangeLog:

* gdbsupport/common-utils.h (startswith): Change return type to
bool.

Change-Id: I1c11b9bb7f89b3885c1bb55097adb5be6d333ad4

gdb/ChangeLog
gdb/gdbsupport/common-utils.h

index d8e3fe1a2dc0005ed35b5e1ecd26b03cfa83402b..7c737ac9f41f98f422b73b25f7fb23ea585ec046 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-19  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * gdbsupport/common-utils.h (startswith): Change return type to
+       bool.
+
 2019-10-19  Christian Biesinger  <cbiesinger@google.com>
 
        * bcache.c (bcache::print_statistics): Use std::sort instead of qsort.
index a5312cb0c4918b08f8f1702ce4e45afdeef56300..e96fc21e3f20ad20ac5a68d0356624f9cb033c88 100644 (file)
@@ -110,10 +110,9 @@ std::string extract_string_maybe_quoted (const char **arg);
 
 extern char *safe_strerror (int);
 
-/* Return non-zero if the start of STRING matches PATTERN, zero
-   otherwise.  */
+/* Return true if the start of STRING matches PATTERN, false otherwise.  */
 
-static inline int
+static inline bool
 startswith (const char *string, const char *pattern)
 {
   return strncmp (string, pattern, strlen (pattern)) == 0;
This page took 0.031657 seconds and 4 git commands to generate.