mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
phase two of string portability stuff:
don't need ast_ prefixes on functions use individual #defines for function presence add vasprintf to portability library git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
cli.c
7
cli.c
@@ -47,15 +47,10 @@ void ast_cli(int fd, char *fmt, ...)
|
||||
{
|
||||
char *stuff;
|
||||
int res = 0;
|
||||
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
#ifdef SOLARIS
|
||||
stuff = (char *)malloc(10240);
|
||||
vsnprintf(stuff, 10240, fmt, ap);
|
||||
#else
|
||||
res = vasprintf(&stuff, fmt, ap);
|
||||
#endif
|
||||
va_end(ap);
|
||||
if (res == -1) {
|
||||
ast_log(LOG_ERROR, "Out of memory\n");
|
||||
|
Reference in New Issue
Block a user