From a3d9feb0111b75eaa9130c5da59dd587ec0648b7 Mon Sep 17 00:00:00 2001 From: bbrtj Date: Fri, 20 Sep 2024 15:29:07 +0200 Subject: [PATCH] Get rid of initial for loop declarations (for portability) --- Secp256k1.xs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Secp256k1.xs b/Secp256k1.xs index 9e9b058..e8047ae 100644 --- a/Secp256k1.xs +++ b/Secp256k1.xs @@ -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; } }