From: Robert Kessl Date: Wed, 2 Jul 2014 14:13:47 +0000 (+0200) Subject: tableprinter: update of LU -> LLU X-Git-Tag: v6.1~3^2~123 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e7d7cfca2ed6368e93aa17429cd9236032d26b45;p=libucw.git tableprinter: update of LU -> LLU --- diff --git a/ucw/table-test.c b/ucw/table-test.c index b9d1bfe5..c13ae2e3 100644 --- a/ucw/table-test.c +++ b/ucw/table-test.c @@ -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); } diff --git a/ucw/table-types.c b/ucw/table-types.c index 50d3079e..3d06f792 100644 --- a/ucw/table-types.c +++ b/ucw/table-types.c @@ -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[] = {