mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user