diff --git a/src/switch_console.c b/src/switch_console.c index cde782f85d..196004ffaf 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -52,7 +52,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle ret = vasprintf(&data, fmt, ap); #else if ((data = (char *) malloc(2048))) { - vsnprintf(data, 2048, fmt, ap); + ret = vsnprintf(data, 2048, fmt, ap); } #endif va_end(ap); @@ -152,7 +152,7 @@ SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, char * ret = vasprintf(&data, fmt, ap); #else data = (char *) malloc(2048); - vsnprintf(data, 2048, fmt, ap); + ret = vsnprintf(data, 2048, fmt, ap); #endif va_end(ap); if (ret == -1) { diff --git a/src/switch_event.c b/src/switch_event.c index dee2c387a7..a937577724 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -479,7 +479,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_add_header(switch_event_t *event, s va_list ap; va_start(ap, fmt); - vsnprintf(data, sizeof(data), fmt, ap); + ret = vsnprintf(data, sizeof(data), fmt, ap); va_end(ap); if (ret == -1) { @@ -604,7 +604,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, ch ret = vasprintf(&data, fmt, ap); #else data = (char *) malloc(2048); - vsnprintf(data, 2048, fmt, ap); + return = vsnprintf(data, 2048, fmt, ap); #endif va_end(ap); if (ret == -1) { @@ -674,7 +674,7 @@ SWITCH_DECLARE(switch_xml_t) switch_event_xmlize(switch_event_t *event, char *fm ret = vasprintf(&data, fmt, ap); #else data = (char *) malloc(2048); - vsnprintf(data, 2048, fmt, ap); + ret = vsnprintf(data, 2048, fmt, ap); #endif va_end(ap); if (ret == -1) { diff --git a/src/switch_log.c b/src/switch_log.c index 4f82a4586a..4087913cca 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -196,7 +196,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file ret = vasprintf(&data, fmt, ap); #else data = (char *) malloc(2048); - vsnprintf(data, 2048, fmt, ap); + ret = vsnprintf(data, 2048, fmt, ap); #endif va_end(ap); if (ret == -1) {