From: Alan T. DeKok Date: Sun, 13 Apr 2025 21:52:45 +0000 (-0400) Subject: turn checks into explict comparisons X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df500a545982fd74c45fbc8c737bdadfff4adf37;p=thirdparty%2Ffreeradius-server.git turn checks into explict comparisons otherwise in some uses, the checks won't match. --- diff --git a/src/lib/server/tmpl.h b/src/lib/server/tmpl.h index 230c0dafc65..6f1bba1ca27 100644 --- a/src/lib/server/tmpl.h +++ b/src/lib/server/tmpl.h @@ -220,11 +220,11 @@ typedef enum tmpl_type_e { #define tmpl_is_xlat_unresolved(vpt) ((vpt)->type == TMPL_TYPE_XLAT_UNRESOLVED) #define tmpl_is_regex_xlat_unresolved(vpt) ((vpt)->type == TMPL_TYPE_REGEX_XLAT_UNRESOLVED) -#define tmpl_needs_resolving(vpt) ((vpt)->type & TMPL_FLAG_UNRESOLVED) -#define tmpl_contains_data(vpt) ((vpt)->type & TMPL_TYPE_DATA) -#define tmpl_contains_attr(vpt) ((vpt)->type & TMPL_FLAG_ATTR) -#define tmpl_contains_regex(vpt) ((vpt)->type & TMPL_FLAG_REGEX) -#define tmpl_contains_xlat(vpt) ((vpt)->type & TMPL_FLAG_XLAT) +#define tmpl_needs_resolving(vpt) (((vpt)->type & TMPL_FLAG_UNRESOLVED) != 0) +#define tmpl_contains_data(vpt) (((vpt)->type & TMPL_TYPE_DATA) != 0) +#define tmpl_contains_attr(vpt) (((vpt)->type & TMPL_FLAG_ATTR) != 0) +#define tmpl_contains_regex(vpt) (((vpt)->type & TMPL_FLAG_REGEX) != 0) +#define tmpl_contains_xlat(vpt) (((vpt)->type & TMPL_FLAG_XLAT) != 0) extern fr_table_num_ordered_t const tmpl_type_table[];