From b73d92e2c547f29caece9ea0de904d874a6fffab Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 16 Mar 2026 11:23:19 -0400 Subject: 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 --- gdb/python/python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python/python.c') 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 -- cgit v1.2.3