Skip to content

Commit 2e6e812

Browse files
committed
tests: internal: record_accessor: fix variable definition
Signed-off-by: Eduardo Silva <[email protected]>
1 parent e2a5b8b commit 2e6e812

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/internal/record_accessor.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,7 @@ static const unsigned char BIN_DATA[4] = {0x01, 0x02, 0x03, 0x04};
22202220

22212221
static void build_ra_map(msgpack_sbuffer *sbuf, const char **bin_ptr)
22222222
{
2223+
int i;
22232224
msgpack_packer pck;
22242225

22252226
msgpack_sbuffer_init(sbuf);
@@ -2240,7 +2241,7 @@ static void build_ra_map(msgpack_sbuffer *sbuf, const char **bin_ptr)
22402241

22412242
if (bin_ptr) {
22422243
*bin_ptr = NULL;
2243-
for (size_t i = 0; i + sizeof(BIN_DATA) <= sbuf->size; i++) {
2244+
for (i = 0; i + sizeof(BIN_DATA) <= sbuf->size; i++) {
22442245
if (memcmp(sbuf->data + i, BIN_DATA, sizeof(BIN_DATA)) == 0) {
22452246
*bin_ptr = sbuf->data + i;
22462247
break;
@@ -2349,6 +2350,7 @@ static void cb_ra_string_copy()
23492350

23502351
static void cb_ra_string_ref()
23512352
{
2353+
int i;
23522354
msgpack_sbuffer sbuf;
23532355
const char *dummy;
23542356
msgpack_unpacked result;
@@ -2362,7 +2364,7 @@ static void cb_ra_string_ref()
23622364
build_ra_map(&sbuf, &dummy);
23632365

23642366
expected = NULL;
2365-
for (size_t i = 0; i + 3 <= sbuf.size; i++) {
2367+
for (i = 0; i + 3 <= sbuf.size; i++) {
23662368
if (memcmp(sbuf.data + i, "abc", 3) == 0) {
23672369
expected = sbuf.data + i;
23682370
break;

0 commit comments

Comments
 (0)