aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-breakpoint.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2026-03-16 11:23:19 -0400
committerSimon Marchi <simon.marchi@efficios.com>2026-03-16 13:24:00 -0400
commitb73d92e2c547f29caece9ea0de904d874a6fffab (patch)
tree4af89bcd433165cb81cda731a36e5a3fca4afa98 /gdb/python/py-breakpoint.c
parent07caff21f90c2f0c9b7b0e79b00b774be668594c (diff)
downloadbinutils-b73d92e2c547f29caece9ea0de904d874a6fffab.tar.gz
binutils-b73d92e2c547f29caece9ea0de904d874a6fffab.tar.bz2
binutils-b73d92e2c547f29caece9ea0de904d874a6fffab.zip
gdb, gdbserver, gdbsupport: replace many uses of strcmp with streq
Replace all occurrences of: strcmp (...) == 0 strcmp (...) != 0 !strcmp (...) 0 == strcmp (...) strcmp (...) directly used as a boolean predicate with the equivalent expression using streq. This is for consistency (we already use streq as some places in the testsuite) but also for clarity. I think that streq is clearer on the intent than strcmp. It's also a bit shorter. Change-Id: Ibbf5261b1872c240bc0c982c147f6a5477275a91 Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/python/py-breakpoint.c')
-rw-r--r--gdb/python/py-breakpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index c5d3d7e2d7e..03388812ff8 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -1410,7 +1410,7 @@ local_setattro (PyObject *self, PyObject *name, PyObject *v)
/* If the attribute trying to be set is the "stop" method,
but we already have a condition set in the CLI or other extension
language, disallow this operation. */
- if (strcmp (attr.get (), stop_func) == 0)
+ if (streq (attr.get (), stop_func))
{
const struct extension_language_defn *extlang = NULL;