From 0c0798ad42a85b337860c58fc686e5495adb7369 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 8 Dec 2011 10:24:13 +0300 Subject: [PATCH] helper: when displaying sizeof() information use bytes instead of bits This affects the output of get_variable_from_expr(). Signed-off-by: Dan Carpenter --- smatch_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_helper.c b/smatch_helper.c index 4eb0e63e..0babebe9 100644 --- a/smatch_helper.c +++ b/smatch_helper.c @@ -218,7 +218,7 @@ static void __get_variable_from_expr(struct symbol **sym_ptr, char *buf, if (expr->cast_type && get_base_type(expr->cast_type)) { size = (get_base_type(expr->cast_type))->bit_size; - snprintf(tmp, 25, "%d", size); + snprintf(tmp, 25, "%d", bits_to_bytes(size)); append(buf, tmp, len); } return; -- 2.11.4.GIT