diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-27 14:14:19 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-27 14:14:21 +0100 |
commit | 436c53ce0c69cb39e6b1c293a3c9f7ac09ac9035 (patch) | |
tree | 04b96c7a84dc312f86be309809dd45151efbc3cf /src/tcp_subr.c | |
parent | 79ea9d8fec5889d692a0e73561395f2da83f7796 (diff) | |
download | slirp-436c53ce0c69cb39e6b1c293a3c9f7ac09ac9035.zip slirp-436c53ce0c69cb39e6b1c293a3c9f7ac09ac9035.tar.gz slirp-436c53ce0c69cb39e6b1c293a3c9f7ac09ac9035.tar.bz2 |
Use g_snprintf()
The GLib impl guarantees GNU compatible format strings, which fixes
the horror of Windows platform format strings.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'src/tcp_subr.c')
-rw-r--r-- | src/tcp_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tcp_subr.c b/src/tcp_subr.c index a72c86b..9dc541a 100644 --- a/src/tcp_subr.c +++ b/src/tcp_subr.c @@ -642,7 +642,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) } NTOHS(n1); NTOHS(n2); - m_inc(m, snprintf(NULL, 0, "%d,%d\r\n", n1, n2) + 1); + m_inc(m, g_snprintf(NULL, 0, "%d,%d\r\n", n1, n2) + 1); m->m_len = slirp_fmt(m->m_data, M_ROOM(m), "%d,%d\r\n", n1, n2); } else { *eol = '\r'; |