From: Alan T. DeKok Date: Thu, 22 Sep 2022 12:53:40 +0000 (-0400) Subject: minor rearrangement X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02066a0a8245b000668abc816ebbbdd956d684bf;p=thirdparty%2Ffreeradius-server.git minor rearrangement --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index 6043502c315..4ae4521b675 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -1601,16 +1601,6 @@ static int calc_integer(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_t con fr_value_box_t one, two, out; fr_binary_op_t calc = NULL; - /* - * All of the types are the same. Just do the work. - */ - if ((dst->type == in1->type) && - (dst->type == in2->type)) { - if (!calc_integer_type[dst->type]) return invalid_type(dst->type); - - return calc_integer_type[dst->type](ctx, dst, in1, op, in2); - } - /* * We don't do upcasts on shifting. * @@ -1624,6 +1614,16 @@ static int calc_integer(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_t con goto calc_it; } + /* + * All of the types are the same. Just do the work. + */ + if ((dst->type == in1->type) && + (dst->type == in2->type)) { + if (!calc_integer_type[dst->type]) return invalid_type(dst->type); + + return calc_integer_type[dst->type](ctx, dst, in1, op, in2); + } + /* * Upcast to the largest type which will handle the * calculations.