aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-04 23:10:45 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-04 23:10:45 +0000
commit701a8a40c28ea67ef1c76d0838f4a0a9975da423 (patch)
tree0fbe2be055f078c5c36d5845580d407e10530362 /channels
parent832983e43a42ce1141e10d46a8cadd6e2ac48ba9 (diff)
Fix minor misuses of snprintf
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105841 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c6
-rw-r--r--channels/console_gui.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index aa81a1e51..8f32a6e24 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -10607,7 +10607,7 @@ static void *pri_dchannel(void *vpri)
}
#endif
- snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
+ snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
if (e->ring.redirectingreason >= 0)
pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
@@ -10652,7 +10652,7 @@ static void *pri_dchannel(void *vpri)
if (e->ring.redirectingreason >= 0)
pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
- snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
+ snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -12522,7 +12522,7 @@ static int action_zapshowchannels(struct mansession *s, const struct message *m)
astman_send_ack(s, m, "Zapata channel status will follow");
if (!ast_strlen_zero(id))
- snprintf(idText, sizeof(idText) - 1, "ActionID: %s\r\n", id);
+ snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
ast_mutex_lock(&iflock);
diff --git a/channels/console_gui.c b/channels/console_gui.c
index aa2f2cf95..73791883c 100644
--- a/channels/console_gui.c
+++ b/channels/console_gui.c
@@ -306,7 +306,7 @@ static void keypad_pick_up(struct video_desc *env)
char buf[160];
const char *who = ast_skip_blanks(read_message(gui->bd_msg));
buf[sizeof(buf) - 1] = '\0';
- snprintf(buf, sizeof(buf) - 1, "console dial %s", who);
+ snprintf(buf, sizeof(buf), "console dial %s", who);
ast_log(LOG_WARNING, "doing <%s>\n", buf);
print_message(gui->bd_dialed, "\n");
print_message(gui->bd_dialed, who);