[asterisk-commits] rizzo: trunk r93582 - in /trunk: apps/ cdr/ channels/ main/ res/ utils/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 18 03:46:18 CST 2007
Author: rizzo
Date: Tue Dec 18 03:46:18 2007
New Revision: 93582
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93582
Log:
remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...
Modified:
trunk/apps/app_adsiprog.c
trunk/apps/app_ices.c
trunk/cdr/cdr_csv.c
trunk/channels/chan_iax2.c
trunk/channels/chan_unistim.c
trunk/main/asterisk.c
trunk/main/astmm.c
trunk/main/config.c
trunk/main/db.c
trunk/res/res_crypto.c
trunk/utils/extconf.c
Modified: trunk/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_adsiprog.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/apps/app_adsiprog.c (original)
+++ trunk/apps/app_adsiprog.c Tue Dec 18 03:46:18 2007
@@ -1356,7 +1356,7 @@
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);
Modified: trunk/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_ices.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/apps/app_ices.c (original)
+++ trunk/apps/app_ices.c Tue Dec 18 03:46:18 2007
@@ -145,7 +145,7 @@
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)
Modified: trunk/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr/cdr_csv.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/cdr/cdr_csv.c (original)
+++ trunk/cdr/cdr_csv.c Tue Dec 18 03:46:18 2007
@@ -258,7 +258,7 @@
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"))) {
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Tue Dec 18 03:46:18 2007
@@ -1893,7 +1893,7 @@
/* 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))) {
Modified: trunk/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Tue Dec 18 03:46:18 2007
@@ -1711,7 +1711,7 @@
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 @@
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 @@
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 @@
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) {
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Dec 18 03:46:18 2007
@@ -1135,7 +1135,7 @@
}
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);
Modified: trunk/main/astmm.c
URL: http://svn.digium.com/view/asterisk/trunk/main/astmm.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/main/astmm.c (original)
+++ trunk/main/astmm.c Tue Dec 18 03:46:18 2007
@@ -465,7 +465,7 @@
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);
Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Tue Dec 18 03:46:18 2007
@@ -1082,7 +1082,7 @@
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)) {
Modified: trunk/main/db.c
URL: http://svn.digium.com/view/asterisk/trunk/main/db.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Tue Dec 18 03:46:18 2007
@@ -53,7 +53,7 @@
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;
}
Modified: trunk/res/res_crypto.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_crypto.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/res/res_crypto.c (original)
+++ trunk/res/res_crypto.c Tue Dec 18 03:46:18 2007
@@ -449,13 +449,13 @@
}
/* 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 @@
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
Modified: trunk/utils/extconf.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/extconf.c?view=diff&rev=93582&r1=93581&r2=93582
==============================================================================
--- trunk/utils/extconf.c (original)
+++ trunk/utils/extconf.c Tue Dec 18 03:46:18 2007
@@ -3656,7 +3656,7 @@
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 ) {
More information about the asterisk-commits
mailing list