public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: Make startswith return a bool
@ 2019-10-19 21:01 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2019-10-19 21:01 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2377111731972d841731bc674ed6a7fb3ab90a53

commit 2377111731972d841731bc674ed6a7fb3ab90a53
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Sat Oct 19 17:00:35 2019 -0400

    gdb: Make startswith return a bool
    
    gdb/ChangeLog:
    
    	* gdbsupport/common-utils.h (startswith): Change return type to
    	bool.
    
    Change-Id: I1c11b9bb7f89b3885c1bb55097adb5be6d333ad4

Diff:
---
 gdb/ChangeLog                 | 5 +++++
 gdb/gdbsupport/common-utils.h | 5 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d8e3fe1..7c737ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/gdbsupport/common-utils.h b/gdb/gdbsupport/common-utils.h
index a5312cb..e96fc21 100644
--- a/gdb/gdbsupport/common-utils.h
+++ b/gdb/gdbsupport/common-utils.h
@@ -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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-19 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 21:01 [binutils-gdb] gdb: Make startswith return a bool Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).