Don't free the BIGNUM passed to BN_mpi2bn
[openssl.git] / crypto / bn / bn_lib.c
index 09d3954dada8049efbfa04d0bb815498c5a7acf4..4b37906319fc96e72975f33be0a3a72beb7cae37 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifndef BN_DEBUG
-# undef NDEBUG                  /* avoid conflicting definitions */
-# define NDEBUG
-#endif
-
 #include <assert.h>
 #include <limits.h>
 #include "internal/cryptlib.h"
@@ -345,11 +340,6 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
             A[2] = a2;
             A[3] = a3;
         }
-        /*
-         * workaround for ultrix cc: without 'case 0', the optimizer does
-         * the switch table by doing a=top&3; a--; goto jump_table[a];
-         * which fails for top== 0
-         */
         switch (b->top & 3) {
         case 3:
             A[2] = B[2];
@@ -358,6 +348,7 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
         case 1:
             A[0] = B[0];
         case 0:
+            /* Without the "case 0" some old optimizers got this wrong. */
             ;
         }
     }