Skip to content

Commit 1f46d60

Browse files
committed
Disambiguate bench functions and types
1 parent f54c6c5 commit 1f46d60

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/bench_ecdh.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ typedef struct {
1515
secp256k1_context *ctx;
1616
secp256k1_pubkey point;
1717
unsigned char scalar[32];
18-
} bench_ecdh;
18+
} bench_ecdh_data;
1919

2020
static void bench_ecdh_setup(void* arg) {
2121
int i;
22-
bench_ecdh *data = (bench_ecdh*)arg;
22+
bench_ecdh_data *data = (bench_ecdh_data*)arg;
2323
const unsigned char point[] = {
2424
0x03,
2525
0x54, 0x94, 0xc1, 0x5d, 0x32, 0x09, 0x97, 0x06,
@@ -39,15 +39,15 @@ static void bench_ecdh_setup(void* arg) {
3939
static void bench_ecdh(void* arg) {
4040
int i;
4141
unsigned char res[32];
42-
bench_ecdh *data = (bench_ecdh*)arg;
42+
bench_ecdh_data *data = (bench_ecdh_data*)arg;
4343

4444
for (i = 0; i < 20000; i++) {
4545
CHECK(secp256k1_ecdh(data->ctx, res, &data->point, data->scalar) == 1);
4646
}
4747
}
4848

4949
int main(void) {
50-
bench_ecdh data;
50+
bench_ecdh_data data;
5151

5252
run_benchmark("ecdh", bench_ecdh, bench_ecdh_setup, NULL, &data, 10, 20000);
5353
return 0;

src/bench_recover.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ typedef struct {
1313
secp256k1_context *ctx;
1414
unsigned char msg[32];
1515
unsigned char sig[64];
16-
} bench_recover;
16+
} bench_recover_data;
1717

1818
void bench_recover(void* arg) {
1919
int i;
20-
bench_recover *data = (bench_recover*)arg;
20+
bench_recover_data *data = (bench_recover_data*)arg;
2121
secp256k1_pubkey pubkey;
2222
unsigned char pubkeyc[33];
2323

@@ -38,7 +38,7 @@ void bench_recover(void* arg) {
3838

3939
void bench_recover_setup(void* arg) {
4040
int i;
41-
bench_recover *data = (bench_recover*)arg;
41+
bench_recover_data *data = (bench_recover_data*)arg;
4242

4343
for (i = 0; i < 32; i++) {
4444
data->msg[i] = 1 + i;
@@ -49,7 +49,7 @@ void bench_recover_setup(void* arg) {
4949
}
5050

5151
int main(void) {
52-
bench_recover data;
52+
bench_recover_data data;
5353

5454
data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY);
5555

0 commit comments

Comments
 (0)