diff options
Diffstat (limited to 'plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c')
-rw-r--r-- | plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c b/plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c index 51841e7853..77ca05a6fc 100644 --- a/plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c +++ b/plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c @@ -28,7 +28,7 @@ * Return: true if this 1, false in all other cases */ int -gcry_mpi_gcd( gcry_mpi_t g, gcry_mpi_t xa, gcry_mpi_t xb ) +_gcry_mpi_gcd (gcry_mpi_t g, gcry_mpi_t xa, gcry_mpi_t xb) { gcry_mpi_t a, b; @@ -38,17 +38,15 @@ gcry_mpi_gcd( gcry_mpi_t g, gcry_mpi_t xa, gcry_mpi_t xb ) /* TAOCP Vol II, 4.5.2, Algorithm A */ a->sign = 0; b->sign = 0; - while( gcry_mpi_cmp_ui( b, 0 ) ) { - _gcry_mpi_fdiv_r( g, a, b ); /* g used as temorary variable */ + while (mpi_cmp_ui (b, 0)) + { + _gcry_mpi_fdiv_r( g, a, b ); /* G is used as temporary variable. */ mpi_set(a,b); mpi_set(b,g); - } + } mpi_set(g, a); mpi_free(a); mpi_free(b); - return !gcry_mpi_cmp_ui( g, 1); + return !mpi_cmp_ui( g, 1); } - - - |