From 5320653aba7122f64eab25fb0b336597b9120c11 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Mon, 6 Sep 2021 11:43:16 +0300 Subject: [PATCH] print_load: Remove reference to CONFIG_MAX_TASKS This is removed from nuttx, and the size of s->last_times can be just checked with sizeof() Signed-off-by: Jukka Laitinen --- platforms/posix/src/px4/common/print_load.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/posix/src/px4/common/print_load.cpp b/platforms/posix/src/px4/common/print_load.cpp index e84d3fd477..4af8c3ea54 100644 --- a/platforms/posix/src/px4/common/print_load.cpp +++ b/platforms/posix/src/px4/common/print_load.cpp @@ -72,7 +72,7 @@ void init_print_load(struct print_load_s *s) s->new_time = hrt_absolute_time(); s->interval_start_time = s->new_time; - for (int i = 0; i < CONFIG_MAX_TASKS; i++) { + for (size_t i = 0; i < sizeof(s->last_times) / sizeof(s->last_times[0]); i++) { s->last_times[i] = 0; }