Fix source where indent will not be able to cope
[openssl.git] / crypto / bn / bn_kron.c
index 49f75594aed019f26e8c36ff543432daadb5a919..6c0cd08210d39259994c09a78a9ec1006ba49b22 100644 (file)
@@ -53,9 +53,9 @@
  *
  */
 
+#include "cryptlib.h"
 #include "bn_lcl.h"
 
-
 /* least significant word */
 #define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0])
 
@@ -66,7 +66,8 @@ int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
        int ret = -2; /* avoid 'uninitialized' warning */
        int err = 0;
        BIGNUM *A, *B, *tmp;
-       /* In 'tab', only odd-indexed entries are relevant:
+       /*-
+        * In 'tab', only odd-indexed entries are relevant:
         * For any odd BIGNUM n,
         *     tab[BN_lsw(n) & 7]
         * is $(-1)^{(n^2-1)/8}$ (using TeX notation).
@@ -74,6 +75,9 @@ int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
         */
        static const int tab[8] = {0, 1, 0, -1, 0, -1, 0, 1};
 
+       bn_check_top(a);
+       bn_check_top(b);
+
        BN_CTX_start(ctx);
        A = BN_CTX_get(ctx);
        B = BN_CTX_get(ctx);
@@ -172,8 +176,7 @@ int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
                tmp = A; A = B; B = tmp;
                tmp->neg = 0;
                }
-       
- end:
+end:
        BN_CTX_end(ctx);
        if (err)
                return -2;