]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
add 'const' qualifiers in various places where they should have been
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 12 May 2009 13:59:35 +0000 (13:59 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 12 May 2009 13:59:35 +0000 (13:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3

24 files changed:
apps/app_chanspy.c
apps/app_confbridge.c
apps/app_controlplayback.c
apps/app_dial.c
apps/app_directed_pickup.c
apps/app_externalivr.c
apps/app_meetme.c
apps/app_mixmonitor.c
apps/app_page.c
apps/app_playback.c
apps/app_queue.c
apps/app_sendtext.c
apps/app_stack.c
apps/app_transfer.c
apps/app_voicemail.c
channels/chan_dahdi.c
channels/chan_misdn.c
channels/console_gui.c
funcs/func_curl.c
main/devicestate.c
main/features.c
main/pbx.c
main/term.c
res/res_odbc.c

index 07eac74a28a0ee351c7c4fe2897313f7755d2c79..76d82305e7ac2861bd7431f4540c3035c25b50d8 100644 (file)
@@ -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 */
index 3531b684bef4c5c364cfb2b308691a2eda0f34d6..41edb2be32d6a64de2dea1bb07f90bcbad29af86 100644 (file)
@@ -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 */
index 4d7432d9cd6e3c439dd0e470cdeab894de33630c..fbcf691576a898058c7053bc38d99b54d466111e 100644 (file)
@@ -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),
index 77d8a8623bb48588efbe393d7fb5d34b23963dab..7364a4605780a1d8f0b4e5211cc8d94df395de7c 100644 (file)
@@ -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",
index 283846e1545aba135e954651d20fca5e952c6457..2f4c18237bc3aee379a97abf8e74ed082410d2c5 100644 (file)
@@ -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 */
index a615fd76fd2d61107e509d129c97037bfa220615..647d5505389f701a24e5aff391e93f1ca490bbf3 100644 (file)
@@ -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"
index e001f5ee0c49fb5d71163a29d5b32178c07e76b8..2f9cdb7927a0540bcca728c5a98ab38b7b43d14e 100644 (file)
@@ -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;
index f67422aaec38c4ec609f1df42a0272e9f9d2ad81..b8a4e5d653dbeebb00501279f0c8a751603eb685 100644 (file)
@@ -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;
index a393e81f9ab74a0ca9a68c3c5faf73a1d49ecf63..9e0547be673415d07ac120f805635b94d3bdb438 100644 (file)
@@ -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),
index c32fccc1e59c9207681c98572bcc731479b267cf..a61c49bc9b2513b6c15d92bcaab8cc03f19a8e67 100644 (file)
@@ -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)
 {
index 6590f6bad1a8cd0d008d1c6417d7b48fe8bf0647..b63aeb4269c240af8f371a23c42b0756dd346e14 100644 (file)
@@ -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
 
index f890ae4bfb2702d67db031ddd66b68a70aa2bd48..2d8ccf811f53bb1169e019f828352ab70506866e 100644 (file)
@@ -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)
 {
index a3a1bf401c24c545e86017a398babe6263612a57..83d204b55411eac82ceb4ae8503531ed84a8c868 100644 (file)
@@ -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);
 
index e1452bb5905e57c7fcb5680358f9a43dc48f0e48..11107a1ba72e253242fe6a2ef1d3ed7f9671fe1a 100644 (file)
@@ -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)
 {
index b6737b37d166297256f5d439500ad58db6c54f1e..a87121ec091896cf1e5bee40e43df88dd3065de7 100644 (file)
@@ -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
index 3306b5559c9b38986f856855a83a12e86ee3a95c..ab118cc89f786a57674ea9d6b874491619210dd9 100644 (file)
@@ -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)
 {
index 34402b0d6d677f6dd0dc22679a3777575b622a76..b6639baddee89a78cecd953676a14c2f82836e18 100644 (file)
@@ -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 */
index c3ced5e499ad948af19c080a27734227132a390f..21088baa08b137a52788f19d82c53325acc1622f 100644 (file)
@@ -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)", "-_", "=+", "[{",
        "]}", "\\|", ";:", "'\"", ",<", ".>", "/?",
index b7918836dd6706f3a80a3a5cf0872bede6fedeb0..482502558ed55c64ccff54287ef081f5fc3d4455 100644 (file)
@@ -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)
 {
index 4e40d84a82d470a4ce43f9aa38d9b8015c723d91..4e332b3f09ffb728040abda5142083b709187098 100644 (file)
@@ -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 */
index 877e8ee419d59ca7f89eee2dc645071efc81780a..cef604cede98de84a575f913bc2448fcce6e40c7 100644 (file)
@@ -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
                 */
index 67e4edfe1f6d49643452f2c67ac959ad3f1acfea..d5f4ead90a2ddc0fbde3386bd4e184cf60e78a3f 100644 (file)
@@ -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);
index 7f38ee5cec58034bcaf5052b2323ed2b006e6627..142b38847af4d1865644500441b4e79536bff0b8 100644 (file)
@@ -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",
index 19280d49e52dd37677d19ccbfed3828c314b1969..a459afcf86a166e23442713385263b8d195f4b0b 100644 (file)
@@ -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)
 {