From: Arran Cudbard-Bell Date: Sun, 19 Feb 2023 22:53:26 +0000 (-0600) Subject: xlat: Quiet clang scan by ensuring print functions succeed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=049e739e81ca8cf3c4309fa0f35563847717446d;p=thirdparty%2Ffreeradius-server.git xlat: Quiet clang scan by ensuring print functions succeed --- diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index 9664588fba6..fc4ef326d2b 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -1075,7 +1075,7 @@ static int xlat_expr_logical_purify(xlat_exp_t *node, void *instance, request_t { char *name; - xlat_aprint(node, &name, group, NULL); + MEM(xlat_aprint(node, &name, group, NULL) >= 0); xlat_exp_set_name_buffer_shallow(node, name); } diff --git a/src/lib/unlang/xlat_purify.c b/src/lib/unlang/xlat_purify.c index 97dfe81b5ce..84cc828655a 100644 --- a/src/lib/unlang/xlat_purify.c +++ b/src/lib/unlang/xlat_purify.c @@ -46,7 +46,7 @@ static void xlat_value_list_to_xlat(xlat_exp_head_t *head, FR_DLIST_HEAD(fr_valu char *name; node->quote = T_BARE_WORD; - fr_value_box_aprint(node, &name, box, NULL); + MEM(fr_value_box_aprint(node, &name, box, NULL) >= 0); xlat_exp_set_name_buffer_shallow(node, name); } talloc_free(box); @@ -303,7 +303,7 @@ static int binary_peephole_optimize(TALLOC_CTX *ctx, xlat_exp_t **out, xlat_exp_ if (box.type == FR_TYPE_BOOL) box.enumv = attr_expr_bool_enum; - (void) fr_value_box_aprint(node, &name, &box, NULL); + MEM(fr_value_box_aprint(node, &name, &box, NULL) >= 0); xlat_exp_set_name_buffer_shallow(node, name); fr_value_box_copy(node, &node->data, &box);