From 1ab177757bec9eb28482785f75fd8a4fb8a1313c Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 17 Dec 2009 12:48:02 +0100 Subject: Replace static snprintf() with make_sprintf() where the result is immediately cast to std::string. --- crawl-ref/source/files.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crawl-ref/source/files.cc') diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index b05bbde518..45a0664a5b 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -136,9 +136,7 @@ static void _redraw_all(void) static std::string _uid_as_string() { #ifdef MULTIUSER - char struid[20]; - snprintf( struid, sizeof struid, "-%d", static_cast(getuid()) ); - return std::string(struid); + return make_stringf("-%d", static_cast(getuid())); #else return std::string(); #endif -- cgit v1.2.3-54-g00ecf