From 3c9be11411c4abeefc0cf2233fbd2b421ffebe64 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Mon, 18 Sep 2023 00:17:06 -0400 Subject: option_select HASFLAG guard macro expansion with parens cheap insurance Change-Id: I8b1fccfda55350a2197cbc261b06a8c8c9dd9c65 --- apps/gui/option_select.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/gui/option_select.c') diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index af281dc07c..afc11fc4ee 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -36,8 +36,8 @@ #include "menu.h" #include "quickscreen.h" -/* HASFLAG compares value to a (SINGLE) flag returns true if set, false otherwise */ -#define HASFLAG(settings_list, flag) ((settings_list->flags & flag) == flag) +/* HASFLAG compares value to flags returns true if set, false otherwise */ +#define HASFLAG(settings_list, flag) ((settings_list->flags & (flag)) == (flag)) static int selection_to_val(const struct settings_list *setting, int selection); int option_value_as_int(const struct settings_list *setting) -- cgit v1.2.3