From 1f320b2dddfca9a474d031027b63e65a0d37ac63 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 11 Dec 2009 20:26:40 +0000 Subject: [PATCH] (trunk) fix a couple of cases where we don't use the tr_snprintf() portability wrapper --- libtransmission/tr-dht.c | 2 +- qt/mainwin.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c index 691dc87dd..36be305b9 100644 --- a/libtransmission/tr-dht.c +++ b/libtransmission/tr-dht.c @@ -111,7 +111,7 @@ bootstrap_from_name( const char *name, short int port, int af ) hints.ai_socktype = SOCK_DGRAM; hints.ai_family = af; /* No, just passing p + 1 to gai won't work. */ - snprintf(pp, 10, "%d", port); + tr_snprintf(pp, sizeof(pp), "%d", port); rc = getaddrinfo(name, pp, &hints, &info); if(rc != 0) { diff --git a/qt/mainwin.cc b/qt/mainwin.cc index 4167611e3..914225c89 100644 --- a/qt/mainwin.cc +++ b/qt/mainwin.cc @@ -674,7 +674,7 @@ TrMainWindow :: openHelp( ) int major, minor; sscanf( SHORT_VERSION_STRING, "%d.%d", &major, &minor ); char url[128]; - snprintf( url, sizeof( url ), fmt, major, minor/10 ); + tr_snprintf( url, sizeof( url ), fmt, major, minor/10 ); QDesktopServices :: openUrl( QUrl( QString( url ) ) ); }