Commit b80a67d5 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête
Browse files

stun: Fix format specifier for a size_t variable

This fix may not be entirely cross-platform, and I have been unable to
test whether it is; making it cross-platform is made more difficult by
the fact that the STUN code doesn’t use GLib.

The PRIuPTR macro was defined in POSIX:2004, and later in C99.
http://pubs.opengroup.org/onlinepubs/009696799/basedefs/inttypes.h.html
parent c3011d09
......@@ -46,6 +46,7 @@
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
static bool stun_agent_is_unknown (StunAgent *agent, uint16_t type);
......@@ -80,7 +81,7 @@ bool stun_agent_default_validater (StunAgent *agent,
stun_debug_bytes (username, username_len);
stun_debug ("' (%d) with '", username_len);
stun_debug_bytes (val[i].username, val[i].username_len);
stun_debug ("' (%d) : %d\n",
stun_debug ("' (%" PRIuPTR ") : %d\n",
val[i].username_len, memcmp (username, val[i].username, username_len));
if (username_len == val[i].username_len &&
memcmp (username, val[i].username, username_len) == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment