diff options
-rw-r--r-- | apps/app_adsiprog.c | 2 | ||||
-rw-r--r-- | apps/app_ices.c | 2 | ||||
-rw-r--r-- | cdr/cdr_csv.c | 2 | ||||
-rw-r--r-- | channels/chan_iax2.c | 2 | ||||
-rw-r--r-- | channels/chan_unistim.c | 8 | ||||
-rw-r--r-- | main/asterisk.c | 2 | ||||
-rw-r--r-- | main/astmm.c | 2 | ||||
-rw-r--r-- | main/config.c | 2 | ||||
-rw-r--r-- | main/db.c | 2 | ||||
-rw-r--r-- | res/res_crypto.c | 8 | ||||
-rw-r--r-- | utils/extconf.c | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c index ad0837e6a..118b5a107 100644 --- a/apps/app_adsiprog.c +++ b/apps/app_adsiprog.c @@ -1356,7 +1356,7 @@ static struct adsi_script *compile_script(char *script) if (script[0] == '/') ast_copy_string(fn, script, sizeof(fn)); else - snprintf(fn, sizeof(fn), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, script); + snprintf(fn, sizeof(fn), "%s/%s", ast_config_AST_CONFIG_DIR, script); if (!(f = fopen(fn, "r"))) { ast_log(LOG_WARNING, "Can't open file '%s'\n", fn); diff --git a/apps/app_ices.c b/apps/app_ices.c index 9397b3c7a..b2a4e9b91 100644 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -145,7 +145,7 @@ static int ices_exec(struct ast_channel *chan, void *data) if (((char *)data)[0] == '/') ast_copy_string(filename, (char *) data, sizeof(filename)); else - snprintf(filename, sizeof(filename), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, (char *)data); + snprintf(filename, sizeof(filename), "%s/%s", ast_config_AST_CONFIG_DIR, (char *)data); /* Placeholder for options */ c = strchr(filename, '|'); if (c) diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index 1c0da16d9..cca1e8714 100644 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -258,7 +258,7 @@ static int writefile(char *s, char *acc) return -1; } - snprintf(tmp, sizeof(tmp), "%s/%s/%s.csv", (char *)ast_config_AST_LOG_DIR,CSV_LOG_DIR, acc); + snprintf(tmp, sizeof(tmp), "%s/%s/%s.csv", ast_config_AST_LOG_DIR,CSV_LOG_DIR, acc); ast_mutex_lock(&acf_lock); if (!(f = fopen(tmp, "a"))) { diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 30ac6c7e6..1d1ba7f78 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1893,7 +1893,7 @@ static void reload_firmware(int unload) /* Now that we have marked them dead... load new ones */ if (!unload) { - snprintf(dir, sizeof(dir), "%s/firmware/iax", (char *)ast_config_AST_DATA_DIR); + snprintf(dir, sizeof(dir), "%s/firmware/iax", ast_config_AST_DATA_DIR); fwd = opendir(dir); if (fwd) { while((de = readdir(fwd))) { diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 58ac74875..3021f7c55 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -1711,7 +1711,7 @@ static int write_history(struct unistimsession *pte, char way, char ismissed) return -1; } - snprintf(tmp, sizeof(tmp), "%s/%s", (char *) ast_config_AST_LOG_DIR, USTM_LOG_DIR); + snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_LOG_DIR, USTM_LOG_DIR); if (ast_mkdir(tmp, 0770)) { if (errno != EEXIST) { display_last_error("Unable to create directory for history"); @@ -1731,7 +1731,7 @@ static int write_history(struct unistimsession *pte, char way, char ismissed) atm.tm_year + 1900, atm.tm_mon + 1, atm.tm_mday, atm.tm_hour, atm.tm_min, atm.tm_sec, tmp2); - snprintf(tmp, sizeof(tmp), "%s/%s/%s-%c.csv", (char *) ast_config_AST_LOG_DIR, + snprintf(tmp, sizeof(tmp), "%s/%s/%s-%c.csv", ast_config_AST_LOG_DIR, USTM_LOG_DIR, pte->device->name, way); if ((f = fopen(tmp, "r"))) { struct stat bufstat; @@ -1794,7 +1794,7 @@ static int write_history(struct unistimsession *pte, char way, char ismissed) fclose(f); return -1; } - snprintf(tmp2, sizeof(tmp2), "%s/%s/%s-%c.csv.tmp", (char *) ast_config_AST_LOG_DIR, + snprintf(tmp2, sizeof(tmp2), "%s/%s/%s-%c.csv.tmp", ast_config_AST_LOG_DIR, USTM_LOG_DIR, pte->device->name, way); if (!(f2 = fopen(tmp2, "w"))) { display_last_error("Unable to create temporary history log."); @@ -3036,7 +3036,7 @@ static char OpenHistory(struct unistimsession *pte, char way, FILE ** f) char tmp[AST_CONFIG_MAX_PATH]; char count; - snprintf(tmp, sizeof(tmp), "%s/%s/%s-%c.csv", (char *) ast_config_AST_LOG_DIR, + snprintf(tmp, sizeof(tmp), "%s/%s/%s-%c.csv", ast_config_AST_LOG_DIR, USTM_LOG_DIR, pte->device->name, way); *f = fopen(tmp, "r"); if (!*f) { diff --git a/main/asterisk.c b/main/asterisk.c index 05813e18d..ae825126e 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1135,7 +1135,7 @@ static int ast_tryconnect(void) } memset(&sunaddr, 0, sizeof(sunaddr)); sunaddr.sun_family = AF_LOCAL; - ast_copy_string(sunaddr.sun_path, (char *) ast_config_AST_SOCKET, sizeof(sunaddr.sun_path)); + ast_copy_string(sunaddr.sun_path, ast_config_AST_SOCKET, sizeof(sunaddr.sun_path)); res = connect(ast_consock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)); if (res) { close(ast_consock); diff --git a/main/astmm.c b/main/astmm.c index 37dbd04d6..3d180acec 100644 --- a/main/astmm.c +++ b/main/astmm.c @@ -465,7 +465,7 @@ void __ast_mm_init(void) ast_cli_register_multiple(cli_memory, sizeof(cli_memory) / sizeof(struct ast_cli_entry)); - snprintf(filename, sizeof(filename), "%s/mmlog", (char *)ast_config_AST_LOG_DIR); + snprintf(filename, sizeof(filename), "%s/mmlog", ast_config_AST_LOG_DIR); if (option_verbose) ast_verbose("Asterisk Malloc Debugger Started (see %s))\n", filename); diff --git a/main/config.c b/main/config.c index 7e72e3681..0ad813d8a 100644 --- a/main/config.c +++ b/main/config.c @@ -1082,7 +1082,7 @@ static struct ast_config *config_text_file_load(const char *database, const char if (filename[0] == '/') { ast_copy_string(fn, filename, sizeof(fn)); } else { - snprintf(fn, sizeof(fn), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, filename); + snprintf(fn, sizeof(fn), "%s/%s", ast_config_AST_CONFIG_DIR, filename); } if (ast_test_flag(&flags, CONFIG_FLAG_WITHCOMMENTS)) { @@ -53,7 +53,7 @@ AST_MUTEX_DEFINE_STATIC(dblock); static int dbinit(void) { - if (!astdb && !(astdb = dbopen((char *)ast_config_AST_DB, O_CREAT | O_RDWR, AST_FILE_MODE, DB_BTREE, NULL))) { + if (!astdb && !(astdb = dbopen(ast_config_AST_DB, O_CREAT | O_RDWR, AST_FILE_MODE, DB_BTREE, NULL))) { ast_log(LOG_WARNING, "Unable to open Asterisk database '%s': %s\n", ast_config_AST_DB, strerror(errno)); return -1; } diff --git a/res/res_crypto.c b/res/res_crypto.c index 903d87285..fc7f08abb 100644 --- a/res/res_crypto.c +++ b/res/res_crypto.c @@ -449,13 +449,13 @@ static void crypto_load(int ifd, int ofd) } /* Load new keys */ - if ((dir = opendir((char *)ast_config_AST_KEY_DIR))) { + if ((dir = opendir(ast_config_AST_KEY_DIR))) { while((ent = readdir(dir))) { - try_load_key((char *)ast_config_AST_KEY_DIR, ent->d_name, ifd, ofd, ¬e); + try_load_key(ast_config_AST_KEY_DIR, ent->d_name, ifd, ofd, ¬e); } closedir(dir); } else - ast_log(LOG_WARNING, "Unable to open key directory '%s'\n", (char *)ast_config_AST_KEY_DIR); + ast_log(LOG_WARNING, "Unable to open key directory '%s'\n", ast_config_AST_KEY_DIR); if (note) ast_log(LOG_NOTICE, "Please run the command 'init keys' to enter the passcodes for the keys\n"); @@ -562,7 +562,7 @@ static char *handle_cli_keys_init(struct ast_cli_entry *e, int cmd, struct ast_c if (key->ktype & KEY_NEEDS_PASSCODE) { kn = key->fn + strlen(ast_config_AST_KEY_DIR) + 1; ast_copy_string(tmp, kn, sizeof(tmp)); - try_load_key((char *) ast_config_AST_KEY_DIR, tmp, a->fd, a->fd, &ign); + try_load_key(ast_config_AST_KEY_DIR, tmp, a->fd, a->fd, &ign); } } AST_RWLIST_TRAVERSE_SAFE_END diff --git a/utils/extconf.c b/utils/extconf.c index caed90478..c6e8cf610 100644 --- a/utils/extconf.c +++ b/utils/extconf.c @@ -3656,7 +3656,7 @@ static struct ast_config *config_text_file_load(const char *database, const char if (use_local_dir) snprintf(fn, sizeof(fn), "./%s", filename); else - snprintf(fn, sizeof(fn), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, filename); + snprintf(fn, sizeof(fn), "%s/%s", ast_config_AST_CONFIG_DIR, filename); } if (withcomments && cfg && cfg->include_level < 2 ) { |