]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
minor rearrangement
authorAlan T. DeKok <aland@freeradius.org>
Thu, 22 Sep 2022 12:53:40 +0000 (08:53 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 22 Sep 2022 12:53:54 +0000 (08:53 -0400)
src/lib/util/calc.c

index 6043502c315fa920cccbae8a07a67805293e6179..4ae4521b675a270f9c1cb3e763d95b6d84fe516d 100644 (file)
@@ -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.