From 9690f518f5b644b670f4e8e047083535c106dafa Mon Sep 17 00:00:00 2001 From: russell Date: Sun, 10 Jul 2005 22:56:21 +0000 Subject: more ast_copy_string conversions git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6073 f38db490-d61c-443f-a65b-d21fe96a405b --- cli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli.c') 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); -- cgit v1.2.3