From 644d9eab6c55c736e72afdb4a8f3432a07d8fc11 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 15 Jan 2014 14:48:17 +0100 Subject: [PATCH] radio: Fix crash with radioart after skipping some stations Change-Id: I5dbf60598f9b0b7d56272b6736726c1e6bc2295c --- apps/radio/radioart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/radio/radioart.c b/apps/radio/radioart.c index cab6aa29ce..86a987c14f 100644 --- a/apps/radio/radioart.c +++ b/apps/radio/radioart.c @@ -47,10 +47,10 @@ static struct radioart radioart[MAX_RADIOART_IMAGES]; static int find_oldest_image_index(void) { - int i; + unsigned i; long oldest_tick = current_tick; int oldest_idx = -1; - for(i = 0; ARRAYLEN(radioart); i++) + for(i = 0; i < ARRAYLEN(radioart); i++) { struct radioart *ra = &radioart[i]; /* last_tick is only valid if it's actually loaded, i.e. valid handle */