From: Alan T. DeKok Date: Thu, 25 Nov 2021 21:30:16 +0000 (-0500) Subject: update return code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de0c38637dc0827842d302cd887e736a95ae306c;p=thirdparty%2Ffreeradius-server.git update return code --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index 6e7a5cb8d1f..e8fa1ba9e08 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -1332,9 +1332,13 @@ int fr_value_calc_assignment_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t fr_table_str_by_value(fr_value_box_type_table, dst->type, "")); } - if (rcode == 0) dst->tainted |= src->tainted; + /* + * Don't bother returning private magic numbers. + */ + if (rcode < 0) return -1; - return rcode; + dst->tainted |= src->tainted; + return 0; } /** Calculate DST OP