Change signature of mpi_bigendian_to_host() to reflect usage
diff --git a/library/bignum.c b/library/bignum.c
index d141a17..402a3d5 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -718,10 +718,8 @@
 
 /* Convert a big-endian byte array aligned to the size of mbedtls_mpi_uint
  * into the storage form used by mbedtls_mpi. */
-static int mpi_bigendian_to_host( unsigned char * const buf, size_t size )
+static void mpi_bigendian_to_host( mbedtls_mpi_uint * const p, size_t limbs )
 {
-    mbedtls_mpi_uint * const p = (mbedtls_mpi_uint *) buf;
-    size_t const limbs = size / ciL;
     size_t i;
 
     unsigned char *cur_byte_left;
@@ -732,8 +730,8 @@
 
     mbedtls_mpi_uint tmp_left, tmp_right;
 
-    if( size % ciL != 0 || limbs == 0 )
-        return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
+    if( limbs == 0 )
+        return;
 
     /*
      * Traverse limbs and
@@ -767,7 +765,7 @@
         *cur_limb_left  = tmp_right;
     }
 
-    return( 0 );
+    return;
 }
 
 /*
@@ -795,7 +793,7 @@
     Xp = (unsigned char*) X->p;
     memcpy( Xp + overhead, buf, buflen );
 
-    MBEDTLS_MPI_CHK( mpi_bigendian_to_host( Xp, limbs * ciL ) );
+    mpi_bigendian_to_host( X->p, limbs );
 
 cleanup:
 
@@ -2084,7 +2082,7 @@
     Xp = (unsigned char*) X->p;
     f_rng( p_rng, Xp + overhead, size );
 
-    MBEDTLS_MPI_CHK( mpi_bigendian_to_host( Xp, limbs * ciL ) );
+    mpi_bigendian_to_host( X->p, limbs );
 
 cleanup:
     return( ret );