mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
dboxinfo: fix format strings for uint64_t
Origin commit data
------------------
Commit: f23b9074f6
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-01-12 (Sun, 12 Jan 2014)
This commit is contained in:
@@ -183,10 +183,10 @@ static std::string bytes2string(uint64_t bytes, bool binary)
|
||||
char result[80];
|
||||
|
||||
if (b < base)
|
||||
snprintf(result, sizeof(result), "%llu%s%02llu ", b, g_Locale->getText(LOCALE_UNIT_DECIMAL),
|
||||
snprintf(result, sizeof(result), "%" PRIu64 "%s%02" PRIu64 " ", b, g_Locale->getText(LOCALE_UNIT_DECIMAL),
|
||||
(bytes - b * factor) * 100 / factor);
|
||||
else // no need for fractions for larger numbers
|
||||
snprintf(result, sizeof(result), "%llu ", b);
|
||||
snprintf(result, sizeof(result), "%" PRIu64 " ", b);
|
||||
|
||||
std::string res(result);
|
||||
if (*unit) {
|
||||
|
Reference in New Issue
Block a user