aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-12 13:59:35 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-12 13:59:35 +0000
commitf58bc31e46d2fbf5d6fa3cd0e394046596246bda (patch)
tree8620c3af779d31967e65ebcbb1ad0e41eebbe372
parent5883dca44123f82e1b0253e2857a95ca637bbf44 (diff)
add 'const' qualifiers in various places where they should have been
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193832 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_chanspy.c6
-rw-r--r--apps/app_confbridge.c2
-rw-r--r--apps/app_controlplayback.c2
-rw-r--r--apps/app_dial.c2
-rw-r--r--apps/app_directed_pickup.c4
-rw-r--r--apps/app_externalivr.c6
-rw-r--r--apps/app_meetme.c12
-rw-r--r--apps/app_mixmonitor.c6
-rw-r--r--apps/app_page.c2
-rw-r--r--apps/app_playback.c4
-rw-r--r--apps/app_queue.c2
-rw-r--r--apps/app_sendtext.c2
-rw-r--r--apps/app_stack.c8
-rw-r--r--apps/app_transfer.c2
-rw-r--r--apps/app_voicemail.c2
-rw-r--r--channels/chan_dahdi.c4
-rw-r--r--channels/chan_misdn.c2
-rw-r--r--channels/console_gui.c2
-rw-r--r--funcs/func_curl.c2
-rw-r--r--main/devicestate.c2
-rw-r--r--main/features.c2
-rw-r--r--main/pbx.c2
-rw-r--r--main/term.c2
-rw-r--r--res/res_odbc.c4
24 files changed, 42 insertions, 42 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 07eac74a2..76d82305e 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -325,11 +325,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</application>
***/
-static const char *app_chan = "ChanSpy";
+static const char * const app_chan = "ChanSpy";
-static const char *app_ext = "ExtenSpy";
+static const char * const app_ext = "ExtenSpy";
-static const char *app_dahdiscan = "DAHDIScan";
+static const char * const app_dahdiscan = "DAHDIScan";
enum {
OPTION_QUIET = (1 << 0), /* Quiet, no announcement */
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 3531b684b..41edb2be3 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -111,7 +111,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
* bridge lock if it is important.
*/
-static const char *app = "ConfBridge";
+static const char * const app = "ConfBridge";
enum {
OPTION_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c
index 4d7432d9c..fbcf69157 100644
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -92,7 +92,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</description>
</application>
***/
-static const char *app = "ControlPlayback";
+static const char * const app = "ControlPlayback";
enum {
OPT_OFFSET = (1 << 1),
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 77d8a8623..7364a4605 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1447,7 +1447,7 @@ static int do_privacy(struct ast_channel *chan, struct ast_channel *peer,
ast_autoservice_stop(chan);
if (ast_test_flag64(opts, OPT_PRIVACY) && (res2 >= '1' && res2 <= '5')) {
/* map keypresses to various things, the index is res2 - '1' */
- static const char *_val[] = { "ALLOW", "DENY", "TORTURE", "KILL", "ALLOW" };
+ static const char * const _val[] = { "ALLOW", "DENY", "TORTURE", "KILL", "ALLOW" };
static const int _flag[] = { AST_PRIVACY_ALLOW, AST_PRIVACY_DENY, AST_PRIVACY_TORTURE, AST_PRIVACY_KILL, AST_PRIVACY_ALLOW};
int i = res2 - '1';
ast_verb(3, "--Set privacy database entry %s/%s to %s\n",
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 283846e15..2f4c18237 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -84,8 +84,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</application>
***/
-static const char *app = "Pickup";
-static const char *app2 = "PickupChan";
+static const char * const app = "Pickup";
+static const char * const app2 = "PickupChan";
/*! \todo This application should return a result code, like PICKUPRESULT */
/* Perform actual pickup between two channels */
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index a615fd76f..647d55053 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -48,10 +48,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/tcptls.h"
#include "asterisk/astobj2.h"
-static const char *app = "ExternalIVR";
+static const char * const app = "ExternalIVR";
-static const char *synopsis = "Interfaces with an external IVR application";
-static const char *descrip =
+static const char * const synopsis = "Interfaces with an external IVR application";
+static const char * const descrip =
" ExternalIVR(command|ivr://ivrhosti([,arg[,arg...]])[,options]): Either forks a process\n"
"to run given command or makes a socket to connect to given host and starts\n"
"a generator on the channel. The generator's play list is controlled by the\n"
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index e001f5ee0..2f9cdb792 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -565,12 +565,12 @@ AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
END_OPTIONS );
-static const char *app = "MeetMe";
-static const char *app2 = "MeetMeCount";
-static const char *app3 = "MeetMeAdmin";
-static const char *app4 = "MeetMeChannelAdmin";
-static const char *slastation_app = "SLAStation";
-static const char *slatrunk_app = "SLATrunk";
+static const char * const app = "MeetMe";
+static const char * const app2 = "MeetMeCount";
+static const char * const app3 = "MeetMeAdmin";
+static const char * const app4 = "MeetMeChannelAdmin";
+static const char * const slastation_app = "SLAStation";
+static const char * const slatrunk_app = "SLATrunk";
/* Lookup RealTime conferences based on confno and current time */
static int rt_schedule;
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index f67422aae..b8a4e5d65 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -125,13 +125,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
-static const char *app = "MixMonitor";
+static const char * const app = "MixMonitor";
-static const char *stop_app = "StopMixMonitor";
+static const char * const stop_app = "StopMixMonitor";
struct module_symbols *me;
-static const char *mixmonitor_spy_type = "MixMonitor";
+static const char * const mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
struct ast_audiohook audiohook;
diff --git a/apps/app_page.c b/apps/app_page.c
index a393e81f9..9e0547be6 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -99,7 +99,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</see-also>
</application>
***/
-static const char *app_page= "Page";
+static const char * const app_page= "Page";
enum {
PAGE_DUPLEX = (1 << 0),
diff --git a/apps/app_playback.c b/apps/app_playback.c
index c32fccc1e..a61c49bc9 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -90,8 +90,8 @@ static struct ast_config *say_cfg = NULL;
* 'say load [new|old]' will enable the new or old method, or report status
*/
static const void *say_api_buf[40];
-static const char *say_old = "old";
-static const char *say_new = "new";
+static const char * const say_old = "old";
+static const char * const say_new = "new";
static void save_say_mode(const void *arg)
{
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 6590f6bad..b63aeb426 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -557,7 +557,7 @@ static char *app_upqm = "UnpauseQueueMember" ;
static char *app_ql = "QueueLog" ;
/*! \brief Persistent Members astdb family */
-static const char *pm_family = "Queue/PersistentMembers";
+static const char * const pm_family = "Queue/PersistentMembers";
/* The maximum length of each persistent member queue database entry */
#define PM_MAX_LEN 8192
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index f890ae4bf..2d8ccf811 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -70,7 +70,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</application>
***/
-static const char *app = "SendText";
+static const char * const app = "SendText";
static int sendtext_exec(struct ast_channel *chan, void *data)
{
diff --git a/apps/app_stack.c b/apps/app_stack.c
index a3a1bf401..83d204b55 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -166,10 +166,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</function>
***/
-static const char *app_gosub = "Gosub";
-static const char *app_gosubif = "GosubIf";
-static const char *app_return = "Return";
-static const char *app_pop = "StackPop";
+static const char * const app_gosub = "Gosub";
+static const char * const app_gosubif = "GosubIf";
+static const char * const app_return = "Return";
+static const char * const app_pop = "StackPop";
static void gosub_free(void *data);
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index e1452bb59..11107a1ba 100644
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -72,7 +72,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</application>
***/
-static const char *app = "Transfer";
+static const char * const app = "Transfer";
static int transfer_exec(struct ast_channel *chan, void *data)
{
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index b6737b37d..a87121ec0 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1419,7 +1419,7 @@ static int create_dirpath(char *dest, int len, const char *context, const char *
static const char *mbox(int id)
{
- static const char *msgs[] = {
+ static const char * const msgs[] = {
#ifdef IMAP_STORAGE
imapfolder,
#else
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 3306b5559..ab118cc89 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -158,7 +158,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
-static const char *lbostr[] = {
+static const char * const lbostr[] = {
"0 db (CSU)/0-133 feet (DSX-1)",
"133-266 feet (DSX-1)",
"266-399 feet (DSX-1)",
@@ -4196,7 +4196,7 @@ static int pri_find_dchan(struct dahdi_pri *pri)
#endif /* defined(HAVE_PRI) */
#if defined(HAVE_OPENR2)
-static const char *dahdi_accept_r2_call_app = "DAHDIAcceptR2Call";
+static const char * const dahdi_accept_r2_call_app = "DAHDIAcceptR2Call";
static int dahdi_accept_r2_call_exec(struct ast_channel *chan, void *data)
{
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 34402b0d6..b6639badd 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -3625,7 +3625,7 @@ misdn_overlap_dial_task_disconnect:
static void send_digit_to_chan(struct chan_list *cl, char digit)
{
- static const char *dtmf_tones[] = {
+ static const char * const dtmf_tones[] = {
/* *INDENT-OFF* */
"!941+1336/100,!0/100", /* 0 */
"!697+1209/100,!0/100", /* 1 */
diff --git a/channels/console_gui.c b/channels/console_gui.c
index c3ced5e49..21088baa0 100644
--- a/channels/console_gui.c
+++ b/channels/console_gui.c
@@ -832,7 +832,7 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
* use a translation table, below - one line per entry,
* plain, shift, ctrl, ... using the first char as key.
*/
-static const char *us_kbd_map[] = {
+static const char * const us_kbd_map[] = {
"`~", "1!", "2@", "3#", "4$", "5%", "6^",
"7&", "8*", "9(", "0)", "-_", "=+", "[{",
"]}", "\\|", ";:", "'\"", ",<", ".>", "/?",
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index b7918836d..482502558 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -413,7 +413,7 @@ static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *da
return realsize;
}
-static const char *global_useragent = "asterisk-libcurl-agent/1.0";
+static const char * const global_useragent = "asterisk-libcurl-agent/1.0";
static int curl_instance_init(void *data)
{
diff --git a/main/devicestate.c b/main/devicestate.c
index 4e40d84a8..4e332b3f0 100644
--- a/main/devicestate.c
+++ b/main/devicestate.c
@@ -128,7 +128,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/event.h"
/*! \brief Device state strings for printing */
-static const char *devstatestring[][2] = {
+static const char * const devstatestring[][2] = {
{ /* 0 AST_DEVICE_UNKNOWN */ "Unknown", "UNKNOWN" }, /*!< Valid, but unknown state */
{ /* 1 AST_DEVICE_NOT_INUSE */ "Not in use", "NOT_INUSE" }, /*!< Not used */
{ /* 2 AST_DEVICE IN USE */ "In use", "INUSE" }, /*!< In use */
diff --git a/main/features.c b/main/features.c
index 877e8ee41..cef604ced 100644
--- a/main/features.c
+++ b/main/features.c
@@ -3678,7 +3678,7 @@ static int load_config(void)
char old_parking_ext[AST_MAX_EXTENSION];
char old_parking_con[AST_MAX_EXTENSION] = "";
char *ctg;
- static const char *categories[] = {
+ static const char * const categories[] = {
/* Categories in features.conf that are not
* to be parsed as group categories
*/
diff --git a/main/pbx.c b/main/pbx.c
index 67e4edfe1..d5f4ead90 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -8906,7 +8906,7 @@ static int pbx_builtin_execiftime(struct ast_channel *chan, void *data)
char *s, *appname;
struct ast_timing timing;
struct ast_app *app;
- static const char *usage = "ExecIfTime requires an argument:\n <time range>,<days of week>,<days of month>,<months>[,<timezone>]?<appname>[(<appargs>)]";
+ static const char * const usage = "ExecIfTime requires an argument:\n <time range>,<days of week>,<days of month>,<months>[,<timezone>]?<appname>[(<appargs>)]";
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s\n", usage);
diff --git a/main/term.c b/main/term.c
index 7f38ee5ce..142b38847 100644
--- a/main/term.c
+++ b/main/term.c
@@ -43,7 +43,7 @@ static char prepdata[80] = "";
static char enddata[80] = "";
static char quitdata[80] = "";
-static const char *termpath[] = {
+static const char * const termpath[] = {
"/usr/share/terminfo",
"/usr/local/share/misc/terminfo",
"/usr/lib/terminfo",
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 19280d49e..a459afcf8 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -1594,8 +1594,8 @@ static struct ast_custom_function odbc_function = {
.write = acf_transaction_write,
};
-static const char *app_commit = "ODBC_Commit";
-static const char *app_rollback = "ODBC_Rollback";
+static const char * const app_commit = "ODBC_Commit";
+static const char * const app_rollback = "ODBC_Rollback";
static int reload(void)
{