From f9cbbca041f609156df1f1fc2f714c39a5be930d Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 15 Aug 2006 16:17:03 +0000 Subject: [PATCH] make vsnprintf check work git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2297 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_event.c b/src/switch_event.c index a8e97ca636..9db2fc9f0c 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -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;