]> mj.ucw.cz Git - libucw.git/commitdiff
tableprinter: update of LU -> LLU
authorRobert Kessl <kesslr@centrum.cz>
Wed, 2 Jul 2014 14:13:47 +0000 (16:13 +0200)
committerRobert Kessl <kesslr@centrum.cz>
Wed, 2 Jul 2014 14:13:47 +0000 (16:13 +0200)
ucw/table-test.c
ucw/table-types.c

index b9d1bfe506be35efe465438623a385382d341872..c13ae2e369e4471cf64f94ac50286a48876e4add 100644 (file)
@@ -79,7 +79,7 @@ static void do_print1(struct table *test_tbl)
   table_col_printf(test_tbl, test_col2_uint, "XXX-%u", 22222);
   table_col_bool(test_tbl, test_col3_bool, 1);
   table_col_double(test_tbl, test_col4_double, 1.5);
-  table_col_size(test_tbl, test_col5_size, (1024LU*1024LU*1024LU*5LU));
+  table_col_size(test_tbl, test_col5_size, (1024LLU*1024LLU*1024LLU*5LLU));
   table_col_timestamp(test_tbl, test_col6_time, 1404305876);
   table_end_row(test_tbl);
 
@@ -88,7 +88,7 @@ static void do_print1(struct table *test_tbl)
   table_col_uint(test_tbl, test_col2_uint, 100);
   table_col_bool(test_tbl, test_col3_bool, 0);
   table_col_double(test_tbl, test_col4_double, 1.5);
-  table_col_size(test_tbl, test_col5_size, (1024LU*1024LU*1024LU*2LU));
+  table_col_size(test_tbl, test_col5_size, (1024LLU*1024LLU*1024LLU*2LLU));
   table_col_timestamp(test_tbl, test_col6_time, 1404305909);
   table_end_row(test_tbl);
 }
index 50d3079e98a37b6c643258d17a63bedada410016..3d06f792a7c1d0b43a18eaee39aefb17fc4a1193 100644 (file)
@@ -80,10 +80,10 @@ void table_col_size(struct table *tbl, int col, u64 val)
 
   static u64 unit_div[] = {
     [UNIT_BYTE] = (u64) 1,
-    [UNIT_KILOBYTE] = (u64) 1024LU,
-    [UNIT_MEGABYTE] = (u64) (1024LU * 1024LU),
-    [UNIT_GIGABYTE] = (u64) (1024LU * 1024LU * 1024LU),
-    [UNIT_TERABYTE] = (u64) (1024LU * 1024LU * 1024LU * 1024LU)
+    [UNIT_KILOBYTE] = (u64) 1024LLU,
+    [UNIT_MEGABYTE] = (u64) (1024LLU * 1024LLU),
+    [UNIT_GIGABYTE] = (u64) (1024LLU * 1024LLU * 1024LLU),
+    [UNIT_TERABYTE] = (u64) (1024LLU * 1024LLU * 1024LLU * 1024LLU)
   };
 
   static const char *unit_suffix[] = {