]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
turn checks into explict comparisons
authorAlan T. DeKok <aland@freeradius.org>
Sun, 13 Apr 2025 21:52:45 +0000 (17:52 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 13 Apr 2025 21:52:45 +0000 (17:52 -0400)
otherwise in some uses, the checks won't match.

src/lib/server/tmpl.h

index 230c0dafc65d0e0a27447272eda7b0ed52a5ce51..6f1bba1ca271bded710d7a3af2149395cc2ce296 100644 (file)
@@ -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[];