From: Arran Cudbard-Bell Date: Tue, 25 Jan 2022 13:27:36 +0000 (-0600) Subject: Explicitly print casts for both sides of the map X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e16d9acf2cbc1afc169cf6a39eda0d2f73c3970f;p=thirdparty%2Ffreeradius-server.git Explicitly print casts for both sides of the map --- diff --git a/src/lib/server/cond_tokenize.c b/src/lib/server/cond_tokenize.c index 038d817203..bae2bc63f9 100644 --- a/src/lib/server/cond_tokenize.c +++ b/src/lib/server/cond_tokenize.c @@ -98,10 +98,6 @@ ssize_t cond_print(fr_sbuff_t *out, fr_cond_t const *in) break; case COND_TYPE_MAP: - if (tmpl_rules_cast(c->data.map->lhs)) { - FR_SBUFF_IN_SPRINTF_RETURN(&our_out, "<%s>", - fr_type_to_str(tmpl_rules_cast(c->data.map->lhs))); - } FR_SBUFF_RETURN(map_print, &our_out, c->data.map); break; diff --git a/src/lib/server/map.c b/src/lib/server/map.c index 667c77c7a3..82bc43213e 100644 --- a/src/lib/server/map.c +++ b/src/lib/server/map.c @@ -1926,6 +1926,10 @@ ssize_t map_print(fr_sbuff_t *out, map_t const *map) /* * Print the lhs */ + if (tmpl_rules_cast(map->lhs)) { + FR_SBUFF_IN_SPRINTF_RETURN(&our_out, "<%s>", + fr_type_to_str(tmpl_rules_cast(map->lhs))); + } FR_SBUFF_RETURN(tmpl_print_quoted, &our_out, map->lhs, TMPL_ATTR_REF_PREFIX_YES); /* @@ -1952,6 +1956,11 @@ ssize_t map_print(fr_sbuff_t *out, map_t const *map) return 0; } + if (tmpl_rules_cast(map->rhs)) { + FR_SBUFF_IN_SPRINTF_RETURN(&our_out, "<%s>", + fr_type_to_str(tmpl_rules_cast(map->rhs))); + } + /* * Print the RHS. */