Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 committed Jul 16, 2023
1 parent d693133 commit 0449a9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/internal/log_event_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,10 @@ void dummy()
size_t alloc = 8192;
size_t size = 6;
size_t nsize = 16384;
size_t len = 4;
size_t len = strlen("key1");
void *tmp;

printf("A:sbuf->alloc=%ld sbuf->size=%ld len=%ld nsize=%ld\n", alloc, size, len, nsize);
printf("A:sbuf->alloc=%zu sbuf->size=%zu len=%zu nsize=%zu\n", alloc, size, len, nsize);
while(nsize < size + len) {
size_t tmp_nsize = nsize * 2;
if (tmp_nsize <= nsize) {
Expand All @@ -668,10 +668,10 @@ void dummy()
}
nsize = tmp_nsize;
}
printf("B:sbuf->alloc=%ld sbuf->size=%ld len=%ld nsize=%ld\n",alloc, size, len, nsize);
printf("B:sbuf->alloc=%zu sbuf->size=%zu len=%zu nsize=%zu\n",alloc, size, len, nsize);
tmp = realloc(data, nsize);
if (!tmp) {
printf("C:sbuf->alloc=%ld sbuf->size=%ld len=%ld nsize=%ld\n",alloc, size, len, nsize);
printf("C:sbuf->alloc=%zu sbuf->size=%zu len=%zu nsize=%zu\n",alloc, size, len, nsize);
return;
}
free(tmp);
Expand Down

0 comments on commit 0449a9a

Please sign in to comment.