From: Mark Spencer Date: Thu, 10 Feb 2005 17:40:06 +0000 (+0000) Subject: Fix zap build for gcc 2.95 X-Git-Tag: 1.2.0-beta1~1229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2c0c613c8683473f26d54b5af30c5a18521ae85;p=thirdparty%2Fasterisk.git Fix zap build for gcc 2.95 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5002 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index ab3eab56dc..7ad5b276a1 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -7933,6 +7933,7 @@ static void *pri_dchannel(void *vpri) c = zt_new(pri->pvts[chanpos], AST_STATE_RING, 1, SUB_REAL, law, e->ring.ctype); ast_mutex_lock(&pri->lock); if (c) { + char calledtonstr[10]; if(e->ring.ani2 >= 0) { snprintf(ani2str, 5, "%d", e->ring.ani2); pbx_builtin_setvar_helper(c, "ANI2", ani2str); @@ -7940,7 +7941,6 @@ static void *pri_dchannel(void *vpri) if (!ast_strlen_zero(e->ring.useruserinfo)) { pbx_builtin_setvar_helper(c, "USERUSERINFO", e->ring.useruserinfo); } - char calledtonstr[10]; snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan); pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr); if (option_verbose > 2)