aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-style.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-style.c')
-rw-r--r--gdb/python/py-style.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/python/py-style.c b/gdb/python/py-style.c
index aa6eccaadbe..d149d90aaa9 100644
--- a/gdb/python/py-style.c
+++ b/gdb/python/py-style.c
@@ -135,28 +135,27 @@ stylepy_style_from_name (const char *name, bool *has_intensity_ptr = nullptr,
if (!sub->var.has_value ())
continue;
- if (strcmp (sub->name, "foreground") == 0)
+ if (streq (sub->name, "foreground"))
{
const ui_file_style::color &color
= sub->var->get<ui_file_style::color> ();
style.set_fg (color);
has_fg = true;
}
- else if (strcmp (sub->name, "background") == 0)
+ else if (streq (sub->name, "background"))
{
const ui_file_style::color &color
= sub->var->get<ui_file_style::color> ();
style.set_bg (color);
has_bg = true;
}
- else if (strcmp (sub->name, "intensity") == 0
- && sub->var->type () == var_enum)
+ else if (streq (sub->name, "intensity") && sub->var->type () == var_enum)
{
const char *intensity_str = sub->var->get<const char *> ();
ui_file_style::intensity intensity = ui_file_style::NORMAL;
- if (strcmp (intensity_str, "bold") == 0)
+ if (streq (intensity_str, "bold"))
intensity = ui_file_style::BOLD;
- else if (strcmp (intensity_str, "dim") == 0)
+ else if (streq (intensity_str, "dim"))
intensity = ui_file_style::DIM;
style.set_intensity (intensity);
has_intensity = true;