From 4f048514ecae879fa4bb7b8522baf801229be522 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 4 Feb 2011 20:21:45 +0100 Subject: Nuked almost all trailing whitespace. Check and install the standard git pre-commit hook. --- mpi/mpi-mod.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'mpi/mpi-mod.c') diff --git a/mpi/mpi-mod.c b/mpi/mpi-mod.c index 948bf231..7ebfe6dc 100644 --- a/mpi/mpi-mod.c +++ b/mpi/mpi-mod.c @@ -3,17 +3,17 @@ 2007 Free Software Foundation, Inc. This file is part of Libgcrypt. - + Libgcrypt is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + Libgcrypt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, @@ -35,7 +35,7 @@ struct barrett_ctx_s gcry_mpi_t m; /* The modulus - may not be modified. */ int m_copied; /* If true, M needs to be released. */ int k; - gcry_mpi_t y; + gcry_mpi_t y; gcry_mpi_t r1; /* Helper MPI. */ gcry_mpi_t r2; /* Helper MPI. */ gcry_mpi_t r3; /* Helper MPI allocated on demand. */ @@ -56,7 +56,7 @@ _gcry_mpi_mod (gcry_mpi_t rem, gcry_mpi_t dividend, gcry_mpi_t divisor) _gcry_mpi_barrett_free. If COPY is true M will be transferred to the context and the user may change M. If COPY is false, M may not be changed until gcry_mpi_barrett_free has been called. */ -mpi_barrett_t +mpi_barrett_t _gcry_mpi_barrett_init (gcry_mpi_t m, int copy) { mpi_barrett_t ctx; @@ -137,7 +137,7 @@ _gcry_mpi_mod_barrett (gcry_mpi_t r, gcry_mpi_t x, mpi_barrett_t ctx) /* 1. q1 = floor( x / b^k-1) * q2 = q1 * y * q3 = floor( q2 / b^k+1 ) - * Actually, we don't need qx, we can work direct on r2 + * Actually, we don't need qx, we can work direct on r2 */ mpi_set ( r2, x ); mpi_rshift_limbs ( r2, k-1 ); @@ -167,7 +167,7 @@ _gcry_mpi_mod_barrett (gcry_mpi_t r, gcry_mpi_t x, mpi_barrett_t ctx) } mpi_add ( r, r, ctx->r3 ); } - + /* 4. while r >= m do r = r - m */ while ( mpi_cmp( r, m ) >= 0 ) mpi_sub ( r, r, m ); @@ -182,4 +182,3 @@ _gcry_mpi_mul_barrett (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_mul (w, u, v); mpi_mod_barrett (w, w, ctx); } - -- cgit v1.2.1