From b4ecf5ae09506e08a864740bf03428a000da856a Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:40:39 +0200 Subject: [PATCH] fix sizeof usage --- camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camera.cpp b/camera.cpp index 78e3e0f..4b7ccb9 100644 --- a/camera.cpp +++ b/camera.cpp @@ -53,7 +53,7 @@ static const char *heap_positions[] = { // https://github.com/raspberrypi/rpicam-apps/blob/6de1ab6a899df35f929b2a15c0831780bd8e750e/core/dma_heaps.cpp static int create_dma_allocator() { - for (unsigned int i = 0; i < sizeof(heap_positions); i++) { + for (unsigned int i = 0; i < sizeof(heap_positions) / sizeof(const char *); i++) { int fd = open(heap_positions[i], O_RDWR | O_CLOEXEC, 0); if (fd >= 0) { return fd;