[asterisk-commits] rizzo: trunk r76037 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 20 10:06:54 CDT 2007
Author: rizzo
Date: Fri Jul 20 10:06:54 2007
New Revision: 76037
URL: http://svn.digium.com/view/asterisk?view=rev&rev=76037
Log:
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.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=76037&r1=76036&r2=76037
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jul 20 10:06:54 2007
@@ -10356,8 +10356,9 @@
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;
More information about the asterisk-commits
mailing list