mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002) Reported by: caio1982 Patches: janitor_arraylen5.diff uploaded by caio1982 (license 22) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -752,7 +752,7 @@ int ast_best_codec(int fmts)
|
||||
fmts &= AST_FORMAT_AUDIO_MASK;
|
||||
|
||||
/* Find the first preferred codec in the format given */
|
||||
for (x = 0; x < (sizeof(prefs) / sizeof(prefs[0]) ); x++) {
|
||||
for (x = 0; x < ARRAY_LEN(prefs); x++) {
|
||||
if (fmts & prefs[x])
|
||||
return prefs[x];
|
||||
}
|
||||
|
Reference in New Issue
Block a user