diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-09-06 17:20:33 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-09-06 17:26:58 +0200 |
commit | e6177630198eb1eea2def0374fae1196da0e40ec (patch) | |
tree | 704951804609999fb6ef7a956b04921b9f84c320 /libtommath/bn_mp_mod.c | |
parent | 943f9ab50c110133a5cd1118b5b19cb09301168f (diff) | |
download | cryptodev-linux-e6177630198eb1eea2def0374fae1196da0e40ec.tar.gz cryptodev-linux-e6177630198eb1eea2def0374fae1196da0e40ec.tar.xz cryptodev-linux-e6177630198eb1eea2def0374fae1196da0e40ec.zip |
Run Lindent on libtom(*)
Diffstat (limited to 'libtommath/bn_mp_mod.c')
-rw-r--r-- | libtommath/bn_mp_mod.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/libtommath/bn_mp_mod.c b/libtommath/bn_mp_mod.c index f5cf8d0..9f70026 100644 --- a/libtommath/bn_mp_mod.c +++ b/libtommath/bn_mp_mod.c @@ -16,30 +16,29 @@ */ /* c = a mod b, 0 <= c < b */ -int -mp_mod (mp_int * a, mp_int * b, mp_int * c) +int mp_mod(mp_int * a, mp_int * b, mp_int * c) { - mp_int t; - int res; + mp_int t; + int res; - if ((res = mp_init (&t)) != MP_OKAY) { - return res; - } + if ((res = mp_init(&t)) != MP_OKAY) { + return res; + } - if ((res = mp_div (a, b, NULL, &t)) != MP_OKAY) { - mp_clear (&t); - return res; - } + if ((res = mp_div(a, b, NULL, &t)) != MP_OKAY) { + mp_clear(&t); + return res; + } - if (t.sign != b->sign) { - res = mp_add (b, &t, c); - } else { - res = MP_OKAY; - mp_exch (&t, c); - } + if (t.sign != b->sign) { + res = mp_add(b, &t, c); + } else { + res = MP_OKAY; + mp_exch(&t, c); + } - mp_clear (&t); - return res; + mp_clear(&t); + return res; } #endif |