mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
17
main/dsp.c
17
main/dsp.c
@@ -283,24 +283,17 @@ typedef struct
|
||||
} td;
|
||||
} digit_detect_state_t;
|
||||
|
||||
static float dtmf_row[] =
|
||||
{
|
||||
static const float dtmf_row[] = {
|
||||
697.0, 770.0, 852.0, 941.0
|
||||
};
|
||||
static float dtmf_col[] =
|
||||
{
|
||||
static const float dtmf_col[] = {
|
||||
1209.0, 1336.0, 1477.0, 1633.0
|
||||
};
|
||||
|
||||
static float mf_tones[] =
|
||||
{
|
||||
static const float mf_tones[] = {
|
||||
700.0, 900.0, 1100.0, 1300.0, 1500.0, 1700.0
|
||||
};
|
||||
|
||||
static char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
|
||||
|
||||
static char bell_mf_positions[] = "1247C-358A--69*---0B----#";
|
||||
|
||||
static const char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
|
||||
static const char bell_mf_positions[] = "1247C-358A--69*---0B----#";
|
||||
static int thresholds[THRESHOLD_MAX];
|
||||
|
||||
static inline void goertzel_sample(goertzel_state_t *s, short sample)
|
||||
|
Reference in New Issue
Block a user