From 48212fa0b9521fb554355a6bee34098a1608b175 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 22 Mar 2011 23:46:31 +0000 Subject: [PATCH] (trunk libT) tr_strtruncd() is only used in one place, so make it a private function there instead of leaving it public in utils.h --- libtransmission/utils.c | 3 ++- libtransmission/utils.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libtransmission/utils.c b/libtransmission/utils.c index 80d704c1e..a5237e5eb 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -1429,7 +1429,8 @@ tr_truncd( double x, int precision ) return atof(buf); } -char* +/* return a truncated double as a string */ +static char* tr_strtruncd( char * buf, double x, int precision, size_t buflen ) { tr_snprintf( buf, buflen, "%.*f", precision, tr_truncd( x, precision ) ); diff --git a/libtransmission/utils.h b/libtransmission/utils.h index 43a2f8c1b..930b4c8dd 100644 --- a/libtransmission/utils.h +++ b/libtransmission/utils.h @@ -473,9 +473,6 @@ char* tr_strpercent( char * buf, double x, size_t buflen ); */ char* tr_strratio( char * buf, size_t buflen, double ratio, const char * infinity ) TR_GNUC_NONNULL(1,4); -/* return a truncated double as a string */ -char* tr_strtruncd( char * buf, double x, int precision, size_t buflen ); - /** @brief Portability wrapper for localtime_r() that uses the system implementation if available */ struct tm * tr_localtime_r( const time_t *_clock, struct tm *_result ); -- 2.40.0