Skip to content

Commit

Permalink
fix sizeof usage (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Oct 21, 2024
1 parent abb5d58 commit fd77ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd77ace

Please sign in to comment.