From 548de645512b1554e9c01888a88d9a9438e4d3cf Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Fri, 23 Sep 2022 16:13:44 +0300 Subject: [PATCH] tools/probe: Move data_to_copy variable down in scope Signed-off-by: Jyri Sarha --- tools/probes/probes_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/probes/probes_main.c b/tools/probes/probes_main.c index 2ca2ee995..9aedc3f6f 100644 --- a/tools/probes/probes_main.c +++ b/tools/probes/probes_main.c @@ -216,7 +216,6 @@ void parse_data(char *file_in) struct probe_data_packet *packet; uint8_t data[DATA_READ_LIMIT]; uint32_t total_data_to_copy = 0; - uint32_t data_to_copy = 0; uint8_t *w_ptr; int start, i, j, file; @@ -314,6 +313,7 @@ void parse_data(char *file_in) } /* data copying section */ if (total_data_to_copy > 0) { + uint32_t data_to_copy; /* check if there is enough bytes loaded */ /* or copy partially if not */ if (j + total_data_to_copy > i) {