Skip to content

Commit cb1eb16

Browse files
committed
run make astyle
[skip ci]
1 parent 646ac88 commit cb1eb16

File tree

10 files changed

+92
-66
lines changed

10 files changed

+92
-66
lines changed

bn_mp_fwrite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int mp_fwrite(const mp_int *a, int radix, FILE *stream)
2222
return err;
2323
}
2424

25-
buf = (char*) XMALLOC((size_t)len);
25+
buf = (char *) XMALLOC((size_t)len);
2626
if (buf == NULL) {
2727
return MP_MEM;
2828
}

bn_mp_grow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int mp_grow(mp_int *a, int size)
2929
* in case the operation failed we don't want
3030
* to overwrite the dp member of a.
3131
*/
32-
tmp = (mp_digit*) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)size);
32+
tmp = (mp_digit *) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)size);
3333
if (tmp == NULL) {
3434
/* reallocation failed but "a" is still valid [can be freed] */
3535
return MP_MEM;

bn_mp_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int mp_init(mp_int *a)
1818
int i;
1919

2020
/* allocate memory required and clear it */
21-
a->dp = (mp_digit*) XMALLOC(sizeof(mp_digit) * (size_t)MP_PREC);
21+
a->dp = (mp_digit *) XMALLOC(sizeof(mp_digit) * (size_t)MP_PREC);
2222
if (a->dp == NULL) {
2323
return MP_MEM;
2424
}

bn_mp_init_size.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int mp_init_size(mp_int *a, int size)
2121
size += (MP_PREC * 2) - (size % MP_PREC);
2222

2323
/* alloc mem */
24-
a->dp = (mp_digit*) XMALLOC(sizeof(mp_digit) * (size_t)size);
24+
a->dp = (mp_digit *) XMALLOC(sizeof(mp_digit) * (size_t)size);
2525
if (a->dp == NULL) {
2626
return MP_MEM;
2727
}

bn_mp_prime_random_ex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback
4646
bsize = (size>>3) + ((size&7)?1:0);
4747

4848
/* we need a buffer of bsize bytes */
49-
tmp = (unsigned char*) XMALLOC((size_t)bsize);
49+
tmp = (unsigned char *) XMALLOC((size_t)bsize);
5050
if (tmp == NULL) {
5151
return MP_MEM;
5252
}

bn_mp_set_long.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ int mp_set_long(mp_int *a, unsigned long b)
2121
int x = 0;
2222
int res = mp_grow(a, (CHAR_BIT * sizeof(unsigned long) + DIGIT_BIT - 1) / DIGIT_BIT);
2323
if (res == MP_OKAY) {
24-
mp_zero(a);
25-
if (b) {
26-
a->dp[x++] = (mp_digit)b;
27-
}
28-
a->used = x;
24+
mp_zero(a);
25+
if (b) {
26+
a->dp[x++] = (mp_digit)b;
27+
}
28+
a->used = x;
2929
}
3030
return res;
3131
}

bn_mp_shrink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int mp_shrink(mp_int *a)
2323
}
2424

2525
if (a->alloc != used) {
26-
if ((tmp = (mp_digit*) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)used)) == NULL) {
26+
if ((tmp = (mp_digit *) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)used)) == NULL) {
2727
return MP_MEM;
2828
}
2929
a->dp = tmp;

demo/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
int mtest_opponent(void);
44
int unit_tests(void);
55

6-
void ndraw(mp_int* a, const char* name)
6+
void ndraw(mp_int *a, const char *name)
77
{
88
char *buf;
99
int size;

demo/opponent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ int mtest_opponent(void)
379379
printf("\n");
380380
return 0;
381381

382-
LBL_ERR:
382+
LBL_ERR:
383383
mp_clear_multi(&a, &b, &c, &d, &e, &f, NULL);
384384
printf("\n");
385385
return EXIT_FAILURE;

0 commit comments

Comments
 (0)