summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-10-05 14:29:34 +0200
committerGravatar Nikias Bassen2019-10-05 14:29:34 +0200
commitabe88cdff1cfc5de20ed158d636397d131d0cf5d (patch)
tree79a762202c056352f25979c36f7879f76d8e9ff6 /src
parent3135461d44c725312bd53a4ec2c72246980c8773 (diff)
downloadidevicerestore-abe88cdff1cfc5de20ed158d636397d131d0cf5d.tar.gz
idevicerestore-abe88cdff1cfc5de20ed158d636397d131d0cf5d.tar.bz2
img4: Fix non-C99 compliant variable declaration
Diffstat (limited to 'src')
-rw-r--r--src/img4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/img4.c b/src/img4.c
index c088926..7ce3532 100644
--- a/src/img4.c
+++ b/src/img4.c
@@ -226,6 +226,7 @@ static const unsigned char *asn1_find_element(unsigned int index, unsigned char
unsigned char el_type = 0;
unsigned char el_size = 0;
unsigned int off = 0;
+ int i;
// verify data integrity
if (data[off++] != (ASN1_CONSTRUCTED | ASN1_SEQUENCE))
@@ -250,7 +251,7 @@ static const unsigned char *asn1_find_element(unsigned int index, unsigned char
}
// find the element we are searching
- for (int i = 0; i <= index; i++) {
+ for (i = 0; i <= index; i++) {
off += asn1_get_element(&data[off], &el_type, &el_size);
if (i == index)
break;