aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-14 13:57:15 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-14 13:57:15 +0000
commit5d8654361451b217b1fc604f449554e74a11b70b (patch)
tree30a1118273807f5c6ba0e3ca611ab0c6a160fa3b /pbx
parent3aea726c3943cf31d2d90c194d1e126891b1481d (diff)
Merge remaining audit patch (save dlfcn.c)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3436 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_gtkconsole.c10
-rwxr-xr-xpbx/pbx_spool.c4
-rwxr-xr-xpbx/pbx_wilcalu.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/pbx/pbx_gtkconsole.c b/pbx/pbx_gtkconsole.c
index fa2ac21ac..852daf9a1 100755
--- a/pbx/pbx_gtkconsole.c
+++ b/pbx/pbx_gtkconsole.c
@@ -98,7 +98,7 @@ static void __verboser(const char *stuff, int opos, int replacelast, int complet
char *s2[2];
struct timeval tv;
int ms;
- s2[0] = stuff;
+ s2[0] = (char *)stuff;
s2[1] = NULL;
gtk_clist_freeze(GTK_CLIST(verb));
if (replacelast)
@@ -232,7 +232,7 @@ static void file_ok_sel(GtkWidget *w, GtkFileSelection *fs)
char tmp[AST_CONFIG_MAX_PATH];
char *module = gtk_file_selection_get_filename(fs);
char buf[256];
- snprintf((char *)tmp,sizeof(tmp)-1,"%s/",(char *)ast_config_AST_MODULE_DIR);
+ snprintf(tmp, sizeof(tmp), "%s/", ast_config_AST_MODULE_DIR);
if (!strncmp(module, (char *)tmp, strlen(tmp)))
module += strlen(tmp);
gdk_threads_leave();
@@ -251,7 +251,7 @@ static void add_module(void)
{
char tmp[AST_CONFIG_MAX_PATH];
GtkWidget *filew;
- snprintf((char *)tmp,sizeof(tmp)-1,"%s/*.so",(char *)ast_config_AST_MODULE_DIR);
+ snprintf(tmp, sizeof(tmp), "%s/*.so", ast_config_AST_MODULE_DIR);
filew = gtk_file_selection_new("Load Module");
gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(filew)->ok_button),
"clicked", GTK_SIGNAL_FUNC(file_ok_sel), filew);
@@ -332,8 +332,8 @@ static void *consolethread(void *data)
static int cli_activate(void)
{
- char buf[256];
- strncpy(buf, gtk_entry_get_text(GTK_ENTRY(cli)), sizeof(buf));
+ char buf[256] = "";
+ strncpy(buf, gtk_entry_get_text(GTK_ENTRY(cli)), sizeof(buf) - 1);
gtk_entry_set_text(GTK_ENTRY(cli), "");
if (strlen(buf)) {
ast_cli_command(clipipe[1], buf);
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 9f6455ce8..2105ffe7b 100755
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -129,7 +129,7 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
strncpy(o->dest, c2, sizeof(o->dest) - 1);
} else {
ast_log(LOG_NOTICE, "Channel should be in form Tech/Dest at line %d of %s\n", lineno, fn);
- strcpy(o->tech, "");
+ o->tech[0] = '\0';
}
} else if (!strcasecmp(buf, "callerid")) {
strncpy(o->callerid, c, sizeof(o->callerid) - 1);
@@ -375,7 +375,7 @@ int load_module(void)
{
pthread_t thread;
pthread_attr_t attr;
- snprintf((char *)qdir,sizeof(qdir)-1,"%s/%s",(char *)ast_config_AST_SPOOL_DIR,"outgoing");
+ snprintf(qdir, sizeof(qdir), "%s/%s", ast_config_AST_SPOOL_DIR, "outgoing");
if (mkdir(qdir, 0700) && (errno != EEXIST)) {
ast_log(LOG_WARNING, "Unable to create queue directory %s -- outgoing spool disabled\n", qdir);
return 0;
diff --git a/pbx/pbx_wilcalu.c b/pbx/pbx_wilcalu.c
index 2b92239f4..b3be54461 100755
--- a/pbx/pbx_wilcalu.c
+++ b/pbx/pbx_wilcalu.c
@@ -259,7 +259,7 @@ int load_module(void)
{
int val;
- snprintf((char *)dialfile, sizeof(dialfile)-1,"%s/%s", (char *)ast_config_AST_RUN_DIR,"autodial.ctl");
+ snprintf((char *)dialfile, sizeof(dialfile), "%s/%s", ast_config_AST_RUN_DIR, "autodial.ctl");
if((val=mkfifo(dialfile, 0700))) {
if(errno!=EEXIST){
ast_log(LOG_ERROR, "Error:%d Creating Autodial FIFO\n",errno);