summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2007-07-20 15:06:54 +0000
committerLuigi Rizzo <rizzo@icir.org>2007-07-20 15:06:54 +0000
commitbfc782f4e989e6da2e6b70b2ffef87119333fe53 (patch)
tree7f6fb153709c9ba0a7b41b9247084c4a5f941712 /channels
parentb2fec9ad1675496c0ac59674fa4acf00beecec4b (diff)
Don't use a field size for the last argument of printf format,
because in this case the string is left-aligned and it is not truncated anyways. Omitting the field size prevents the generation of trailing whitespace, which makes the string fit in smaller windows. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 04e03c7f1..4aed9fa94 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10356,8 +10356,9 @@ static int _sip_show_peers(int fd, int *total, struct mansession *s, const struc
regex_t regexbuf;
int havepattern = FALSE;
-#define FORMAT2 "%-25.25s %-15.15s %-3.3s %-3.3s %-3.3s %-8s %-10s %-10s\n"
-#define FORMAT "%-25.25s %-15.15s %-3.3s %-3.3s %-3.3s %-8d %-10s %-10s\n"
+/* the last argument is left-aligned, so we don't need a size anyways */
+#define FORMAT2 "%-25.25s %-15.15s %-3.3s %-3.3s %-3.3s %-8s %-10s %s\n"
+#define FORMAT "%-25.25s %-15.15s %-3.3s %-3.3s %-3.3s %-8d %-10s %s\n"
char name[256];
int total_peers = 0;