diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 23:10:42 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 23:10:42 +0000 |
commit | 055abfe9d96e884c12dc41884e9472f41c5b8591 (patch) | |
tree | 67a2fe73762b64d378d6a34cb489de4ff4492a60 /main/cli.c | |
parent | 961754d4b12da98e84aa43992ebb2c578d94ca30 (diff) |
simplify the ast_dynamic_str_*.... routines by
renaming them to ast_str ... and putting the
struct ast_threadstorage pointer into the struct ast_str.
This makes the code a lot more readable.
At this point we can use these routines also to
replace ast_build_string().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/cli.c')
-rw-r--r-- | main/cli.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/cli.c b/main/cli.c index 895b8b855..acc003e4c 100644 --- a/main/cli.c +++ b/main/cli.c @@ -59,14 +59,14 @@ AST_THREADSTORAGE(ast_cli_buf); void ast_cli(int fd, char *fmt, ...) { int res; - struct ast_dynamic_str *buf; + struct ast_str *buf; va_list ap; - if (!(buf = ast_dynamic_str_thread_get(&ast_cli_buf, AST_CLI_INITLEN))) + if (!(buf = ast_str_thread_get(&ast_cli_buf, AST_CLI_INITLEN))) return; va_start(ap, fmt); - res = ast_dynamic_str_thread_set_va(&buf, 0, &ast_cli_buf, fmt, ap); + res = ast_str_set_va(&buf, 0, fmt, ap); va_end(ap); if (res != AST_DYNSTR_BUILD_FAILED) |