From 2c871a9f32b59770db237c99c4bec01a56f78b39 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Tue, 18 Nov 2025 11:58:37 -0500 Subject: [PATCH] codec: mpg123: use ARRAY_SIZE --- modules/codec/mpg123.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/codec/mpg123.c b/modules/codec/mpg123.c index 3219ebb0bf..60f122eae0 100644 --- a/modules/codec/mpg123.c +++ b/modules/codec/mpg123.c @@ -111,9 +111,7 @@ static int MPG123Open( decoder_t *p_dec ) static const long mp3_rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, }; - for( size_t i = 0; - i < sizeof(mp3_rates) / sizeof(*mp3_rates) && i_ret == MPG123_OK; - ++i ) + for( size_t i = 0; i < ARRAY_SIZE(mp3_rates) && i_ret == MPG123_OK; ++i ) { i_ret = mpg123_format( p_sys->p_handle, mp3_rates[i], MPG123_MONO | MPG123_STEREO,