diff options
author | Luigi Rizzo <rizzo@icir.org> | 2007-01-19 17:48:48 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2007-01-19 17:48:48 +0000 |
commit | e7c5029d23072aade199bec852f3a01a1001ce2a (patch) | |
tree | d290669c071a0e82140a19d6c4f3a6066ff22888 /main | |
parent | a52fa7e5adad8a6b3d812b4ddc45ae03a78b485a (diff) |
in the interest of portability, avoid using %zd when all
we need is to print is an integer that fits in 16 bits.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/rtp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/rtp.c b/main/rtp.c index 9f35d19a3..13c5f57cd 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -431,14 +431,14 @@ static int stun_handle_packet(int s, struct sockaddr_in *src, unsigned char *dat if (len < sizeof(struct stun_header)) { if (option_debug) - ast_log(LOG_DEBUG, "Runt STUN packet (only %zd, wanting at least %zd)\n", len, sizeof(struct stun_header)); + ast_log(LOG_DEBUG, "Runt STUN packet (only %d, wanting at least %d)\n", (int) len, sizeof(struct stun_header)); return -1; } if (stundebug) ast_verbose("STUN Packet, msg %s (%04x), length: %d\n", stun_msg2str(ntohs(hdr->msgtype)), ntohs(hdr->msgtype), ntohs(hdr->msglen)); if (ntohs(hdr->msglen) > len - sizeof(struct stun_header)) { if (option_debug) - ast_log(LOG_DEBUG, "Scrambled STUN packet length (got %d, expecting %zd)\n", ntohs(hdr->msglen), len - sizeof(struct stun_header)); + ast_log(LOG_DEBUG, "Scrambled STUN packet length (got %d, expecting %d)\n", ntohs(hdr->msglen), (int)(len - sizeof(struct stun_header))); } else len = ntohs(hdr->msglen); data += sizeof(struct stun_header); @@ -446,13 +446,13 @@ static int stun_handle_packet(int s, struct sockaddr_in *src, unsigned char *dat while(len) { if (len < sizeof(struct stun_attr)) { if (option_debug) - ast_log(LOG_DEBUG, "Runt Attribute (got %zd, expecting %zd)\n", len, sizeof(struct stun_attr)); + ast_log(LOG_DEBUG, "Runt Attribute (got %d, expecting %d)\n", (int)len, sizeof(struct stun_attr)); break; } attr = (struct stun_attr *)data; if (ntohs(attr->len) > len) { if (option_debug) - ast_log(LOG_DEBUG, "Inconsistent Attribute (length %d exceeds remaining msg len %zd)\n", ntohs(attr->len), len); + ast_log(LOG_DEBUG, "Inconsistent Attribute (length %d exceeds remaining msg len %d)\n", ntohs(attr->len), (int)len); break; } if (stun_process_attr(&st, attr)) { |