summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c')
-rw-r--r--source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c b/source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c
index b344b6f05d..52f7f32f0d 100644
--- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c
+++ b/source4/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c
@@ -19,10 +19,10 @@
int mp_fread(mp_int *a, int radix, FILE *stream)
{
int err, ch, neg, y;
-
+
/* clear a */
mp_zero(a);
-
+
/* if first digit is - then set negative */
ch = fgetc(stream);
if (ch == '-') {
@@ -31,7 +31,7 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
} else {
neg = MP_ZPOS;
}
-
+
for (;;) {
/* find y in the radix map */
for (y = 0; y < radix; y++) {
@@ -42,7 +42,7 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
if (y == radix) {
break;
}
-
+
/* shift up and add */
if ((err = mp_mul_d(a, radix, a)) != MP_OKAY) {
return err;
@@ -50,13 +50,13 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
if ((err = mp_add_d(a, y, a)) != MP_OKAY) {
return err;
}
-
+
ch = fgetc(stream);
}
if (mp_cmp_d(a, 0) != MP_EQ) {
a->sign = neg;
}
-
+
return MP_OKAY;
}