[libblockdev 3/3] Omit cast based distinction and print all as floats
mulhern
amulhern at redhat.com
Wed Sep 3 15:41:33 UTC 2014
It just seems wrong to claim that 16EiB - 1 is exactly
16EiB, which is what we claim when we leave off the decimal point,
when it is only very close, i.e., within 1/100 of an EiB, easily.
Signed-off-by: mulhern <amulhern at redhat.com>
---
src/utils/sizes.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/utils/sizes.c b/src/utils/sizes.c
index 91e2713..9a5ec49 100644
--- a/src/utils/sizes.c
+++ b/src/utils/sizes.c
@@ -59,10 +59,7 @@ gchar* bd_utils_size_human_readable (guint64 size) {
* below are guaranteed to remain within bounds.
*/
- if (INT_EQ_FLOAT (value, (guint64) value))
- return g_strdup_printf ("%"G_GUINT64_FORMAT" %sB", (guint64) value, size_prefixes[i]);
- else
- return g_strdup_printf ("%.2f %sB", value, size_prefixes[i]);
+ return g_strdup_printf ("%.2f %sB", value, size_prefixes[i]);
}
/**
--
1.9.3
More information about the anaconda-patches
mailing list