aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-10 22:56:21 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-10 22:56:21 +0000
commit9690f518f5b644b670f4e8e047083535c106dafa (patch)
tree922450cc41923990ec190243f4948def77780abf /cli.c
parentcd6f09bb95479166e8a62538b941e9e5daa3394e (diff)
more ast_copy_string conversions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6073 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli.c b/cli.c
index f027dd6db..af77b5af5 100755
--- a/cli.c
+++ b/cli.c
@@ -587,7 +587,7 @@ static int handle_debuglevel(int fd, int argc, char *argv[])
option_debug = newlevel;
if (argc == 4) {
filename = argv[3];
- strncpy(debug_filename, filename, sizeof(debug_filename) - 1);
+ ast_copy_string(debug_filename, filename, sizeof(debug_filename));
} else {
debug_filename[0] = '\0';
}
@@ -686,7 +686,7 @@ static int handle_showchan(int fd, int argc, char *argv[])
sec = elapsed_seconds % 60;
snprintf(cdrtime, sizeof(cdrtime), "%dh%dm%ds", hour, min, sec);
} else
- strncpy(cdrtime, "N/A", sizeof(cdrtime) -1);
+ strcpy(cdrtime, "N/A");
ast_cli(fd,
" -- General --\n"
" Name: %s\n"
@@ -784,7 +784,7 @@ static char *complete_fn(char *line, char *word, int pos, int state)
if (pos != 1)
return NULL;
if (word[0] == '/')
- strncpy(filename, word, sizeof(filename)-1);
+ ast_copy_string(filename, word, sizeof(filename));
else
snprintf(filename, sizeof(filename), "%s/%s", (char *)ast_config_AST_MODULE_DIR, word);
c = (char*)filename_completion_function(filename, state);