diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-11 18:09:35 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-11 18:09:35 +0000 |
commit | 8e222897e657656b5b9af006b50e51812dbed1bb (patch) | |
tree | d6654284a45ddbc17f083bedcf5d1055fd08f634 /main/dsp.c | |
parent | 802d09a41e12f28f64a4f6be443ecf0db251b28d (diff) |
Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130129 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/dsp.c')
-rw-r--r-- | main/dsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/dsp.c b/main/dsp.c index f9c8a2d94..f3adcf0be 100644 --- a/main/dsp.c +++ b/main/dsp.c @@ -393,7 +393,7 @@ struct ast_dsp { static void mute_fragment(struct ast_dsp *dsp, fragment_t *fragment) { - if (dsp->mute_fragments >= sizeof(dsp->mute_data) / sizeof(dsp->mute_data[0])) { + if (dsp->mute_fragments >= ARRAY_LEN(dsp->mute_data)) { ast_log(LOG_ERROR, "Too many fragments to mute. Ignoring\n"); return; } @@ -1440,7 +1440,7 @@ static void ast_dsp_prog_reset(struct ast_dsp *dsp) dsp->gsamp_size = modes[dsp->progmode].size; dsp->gsamps = 0; - for (x = 0; x < sizeof(modes[dsp->progmode].freqs) / sizeof(modes[dsp->progmode].freqs[0]); x++) { + for (x = 0; x < ARRAY_LEN(modes[dsp->progmode].freqs); x++) { if (modes[dsp->progmode].freqs[x]) { goertzel_init(&dsp->freqs[x], (float)modes[dsp->progmode].freqs[x], dsp->gsamp_size); max = x + 1; |