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!) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
1fe21371a3
commit
e1378c470f
|
@ -4401,9 +4401,9 @@ static void parse_request(struct sip_request *req)
|
|||
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 */
|
||||
|
|
Loading…
Reference in New Issue