diff options
| author | Simon Marchi <simon.marchi@efficios.com> | 2026-03-16 11:23:19 -0400 |
|---|---|---|
| committer | Simon Marchi <simon.marchi@efficios.com> | 2026-03-16 13:24:00 -0400 |
| commit | b73d92e2c547f29caece9ea0de904d874a6fffab (patch) | |
| tree | 4af89bcd433165cb81cda731a36e5a3fca4afa98 /gdb/python/python.c | |
| parent | 07caff21f90c2f0c9b7b0e79b00b774be668594c (diff) | |
| download | binutils-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/python.c')
| -rw-r--r-- | gdb/python/python.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 5474b8d644f..6e13ab5bb3f 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -552,7 +552,7 @@ gdbpy_parameter_value (const setting &var) l++) if (value == l->use) { - if (strcmp (l->literal, "unlimited") == 0) + if (streq (l->literal, "unlimited")) { /* Compatibility hack for API brokenness. */ if (var.type () == var_pinteger |
