From: Alan T. DeKok Date: Thu, 28 Jul 2022 14:46:20 +0000 (-0400) Subject: 0 isn't an error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44b3e15ec3185173389f5d935050eb00f85f0455;p=thirdparty%2Ffreeradius-server.git 0 isn't an error and we might as well print a meaningful error, too --- diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index 1fdb2dfe049..94f17b302e5 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -171,7 +171,8 @@ static int templatize_rhs(TALLOC_CTX *ctx, edit_result_t *out, fr_pair_t const * * values. */ if (fr_type_is_leaf(type) && - (fr_value_box_cast_in_place(ctx, box, type, lhs->data.enumv) <= 0)) { + (fr_value_box_cast_in_place(ctx, box, type, lhs->data.enumv) < 0)) { + RPEDEBUG("Failed casting %pV to %s type %s enum %s", box, lhs->da->name, fr_type_to_str(type), lhs->data.enumv->name); return -1; }