make vsnprintf check work

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2297 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-08-15 16:17:03 +00:00
parent acf84d7631
commit f9cbbca041
1 changed files with 2 additions and 2 deletions

View File

@ -443,12 +443,12 @@ SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, cha
va_list ap;
if (fmt) {
va_start(ap, fmt);
vsnprintf(data, sizeof(data), fmt, ap);
ret = vsnprintf(data, sizeof(data), fmt, ap);
va_end(ap);
}
if (ret == -1) {
return SWITCH_STATUS_MEMERR;
return SWITCH_STATUS_GENERR;
} else {
event->body = DUP(data);
return SWITCH_STATUS_SUCCESS;