Skip to content

Commit

Permalink
Get rid of initial for loop declarations (for portability)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrtj committed Sep 20, 2024
1 parent e998d0f commit a3d9feb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Secp256k1.xs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ unsigned char* size_bytestr_from_sv(SV *perlval, size_t wanted_size, char *argna

void copy_bytestr(unsigned char *to, unsigned char *from, size_t size)
{
for (int i = 0; i < size; ++i) {
int i;
for (i = 0; i < size; ++i) {
to[i] = from[i];
}
}

void clean_secret(unsigned char *secret)
{
for (int i = 0; i < CURVE_SIZE; ++i) {
int i;
for (i = 0; i < CURVE_SIZE; ++i) {
secret[i] = 0;
}
}
Expand Down

0 comments on commit a3d9feb

Please sign in to comment.