summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_to_signed_bin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_mp_to_signed_bin.c')
-rw-r--r--libtommath/bn_mp_to_signed_bin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libtommath/bn_mp_to_signed_bin.c b/libtommath/bn_mp_to_signed_bin.c
index 69f6423..4d4be88 100644
--- a/libtommath/bn_mp_to_signed_bin.c
+++ b/libtommath/bn_mp_to_signed_bin.c
@@ -16,15 +16,15 @@
*/
/* store in signed [big endian] format */
-int mp_to_signed_bin (const mp_int * a, unsigned char *b)
+int mp_to_signed_bin(const mp_int *a, unsigned char *b)
{
- int res;
+ int res;
- if ((res = mp_to_unsigned_bin (a, b + 1)) != MP_OKAY) {
- return res;
- }
- b[0] = (a->sign == MP_ZPOS) ? (unsigned char)0 : (unsigned char)1;
- return MP_OKAY;
+ if ((res = mp_to_unsigned_bin(a, b + 1)) != MP_OKAY) {
+ return res;
+ }
+ b[0] = (a->sign == MP_ZPOS) ? (unsigned char)0 : (unsigned char)1;
+ return MP_OKAY;
}
#endif