summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_cmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_mp_cmp.c')
-rw-r--r--libtommath/bn_mp_cmp.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/libtommath/bn_mp_cmp.c b/libtommath/bn_mp_cmp.c
index 09cafa0..37f616e 100644
--- a/libtommath/bn_mp_cmp.c
+++ b/libtommath/bn_mp_cmp.c
@@ -17,24 +17,24 @@
/* compare two ints (signed)*/
int
-mp_cmp (const mp_int * a, const mp_int * b)
+mp_cmp(const mp_int *a, const mp_int *b)
{
- /* compare based on sign */
- if (a->sign != b->sign) {
- if (a->sign == MP_NEG) {
- return MP_LT;
- } else {
- return MP_GT;
- }
- }
-
- /* compare digits */
- if (a->sign == MP_NEG) {
- /* if negative compare opposite direction */
- return mp_cmp_mag(b, a);
- } else {
- return mp_cmp_mag(a, b);
- }
+ /* compare based on sign */
+ if (a->sign != b->sign) {
+ if (a->sign == MP_NEG) {
+ return MP_LT;
+ } else {
+ return MP_GT;
+ }
+ }
+
+ /* compare digits */
+ if (a->sign == MP_NEG) {
+ /* if negative compare opposite direction */
+ return mp_cmp_mag(b, a);
+ } else {
+ return mp_cmp_mag(a, b);
+ }
}
#endif