From 4a65747a4b20cbbfb2627bf10ded6f5b897cb908 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 19 Feb 2012 12:07:40 -0800 Subject: Add a COUNTOF macro to get the number of entries in a static array --- OpenAL32/alBuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32/alBuffer.c') diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 6a3bb114..5a0e1dee 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -2136,7 +2136,7 @@ static ALboolean DecomposeUserFormat(ALenum format, enum UserFmtChannels *chans, }; ALuint i; - for(i = 0;i < sizeof(list)/sizeof(list[0]);i++) + for(i = 0;i < COUNTOF(list);i++) { if(list[i].format == format) { @@ -2213,7 +2213,7 @@ static ALboolean DecomposeFormat(ALenum format, enum FmtChannels *chans, enum Fm }; ALuint i; - for(i = 0;i < sizeof(list)/sizeof(list[0]);i++) + for(i = 0;i < COUNTOF(list);i++) { if(list[i].format == format) { -- cgit v1.2.3