aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-06 00:15:02 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-06 00:15:02 +0000
commit5b486420a61f45ae772cdb5880844fe546396812 (patch)
tree7bca0d34afe75d4fd2f9b577c368f3d72da7b92f /main
parentf9f33f16fbad3c7f228791cb1f4e38b4d73ced73 (diff)
Merged revisions 105841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r105841 | tilghman | 2008-03-04 17:10:45 -0600 (Tue, 04 Mar 2008) | 2 lines Fix minor misuses of snprintf ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106307 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/asterisk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 2548d4316..287b6ccd0 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -2201,7 +2201,7 @@ static char *cli_complete(EditLine *el, int ch)
len = lf->cursor - ptr;
if (ast_opt_remote) {
- snprintf(buf, sizeof(buf),"_COMMAND NUMMATCHES \"%s\" \"%s\"", lf->buffer, ptr);
+ snprintf(buf, sizeof(buf), "_COMMAND NUMMATCHES \"%s\" \"%s\"", lf->buffer, ptr);
fdprint(ast_consock, buf);
res = read(ast_consock, buf, sizeof(buf));
buf[res] = '\0';
@@ -2213,7 +2213,7 @@ static char *cli_complete(EditLine *el, int ch)
/* Start with a 2048 byte buffer */
if (!(mbuf = ast_malloc(maxmbuf)))
return (char *)(CC_ERROR);
- snprintf(buf, sizeof(buf),"_COMMAND MATCHESARRAY \"%s\" \"%s\"", lf->buffer, ptr);
+ snprintf(buf, sizeof(buf), "_COMMAND MATCHESARRAY \"%s\" \"%s\"", lf->buffer, ptr);
fdprint(ast_consock, buf);
res = 0;
mbuf[0] = '\0';
@@ -2516,7 +2516,7 @@ static void ast_readconfig(void)
ast_copy_string(cfg_paths.config_dir, DEFAULT_CONFIG_DIR, sizeof(cfg_paths.config_dir));
ast_copy_string(cfg_paths.spool_dir, DEFAULT_SPOOL_DIR, sizeof(cfg_paths.spool_dir));
ast_copy_string(cfg_paths.module_dir, DEFAULT_MODULE_DIR, sizeof(cfg_paths.module_dir));
- snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir) - 1, "%s/monitor", cfg_paths.spool_dir);
+ snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", cfg_paths.spool_dir);
ast_copy_string(cfg_paths.var_dir, DEFAULT_VAR_DIR, sizeof(cfg_paths.var_dir));
ast_copy_string(cfg_paths.data_dir, DEFAULT_DATA_DIR, sizeof(cfg_paths.data_dir));
ast_copy_string(cfg_paths.log_dir, DEFAULT_LOG_DIR, sizeof(cfg_paths.log_dir));
@@ -2548,7 +2548,7 @@ static void ast_readconfig(void)
ast_copy_string(cfg_paths.config_dir, v->value, sizeof(cfg_paths.config_dir));
} else if (!strcasecmp(v->name, "astspooldir")) {
ast_copy_string(cfg_paths.spool_dir, v->value, sizeof(cfg_paths.spool_dir));
- snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir) - 1, "%s/monitor", v->value);
+ snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", v->value);
} else if (!strcasecmp(v->name, "astvarlibdir")) {
ast_copy_string(cfg_paths.var_dir, v->value, sizeof(cfg_paths.var_dir));
if (!found.dbdir)