[svn-commits] rizzo: trunk r45010 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Oct 13 04:18:01 MST 2006


Author: rizzo
Date: Fri Oct 13 06:18:01 2006
New Revision: 45010

URL: http://svn.digium.com/view/asterisk?rev=45010&view=rev
Log:
Try to avoid the use of 'z' modifier in cases where it is not
necessary - rather, cast the argument to int.

In this case, the string is in a UDP packet and as such
limited to 64k so its length can be safely represented in an int
without truncation (besides, this is just a debugging message!)


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=45010&r1=45009&r2=45010&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Oct 13 06:18:01 2006
@@ -4401,9 +4401,9 @@
 		else if (*c == '\n') { /* end of this line */
 			*c = '\0';
 			if (sipdebug && option_debug > 3)
-				ast_log(LOG_DEBUG, "%7s %2d [%3zd]: %s\n",
+				ast_log(LOG_DEBUG, "%7s %2d [%3d]: %s\n",
 					req->headers < 0 ? "Header" : "Body",
-					i, strlen(dst[i]), dst[i]);
+					i, (int)strlen(dst[i]), dst[i]);
 			if (ast_strlen_zero(dst[i]) && req->headers < 0) {
 				req->headers = i;	/* record number of header lines */
 				dst = req->line;	/* start working on the body */



More information about the svn-commits mailing list