From 4e28c552ca19e1778dd39c616b0d72956de678c3 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 6 Oct 2004 08:22:31 +0000 Subject: [PATCH] simplify code [r4061] --- ir/tv/tv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir/tv/tv.c b/ir/tv/tv.c index d348ce226..e7c189291 100644 --- a/ir/tv/tv.c +++ b/ir/tv/tv.c @@ -1481,7 +1481,7 @@ char *get_tarval_bitpattern(tarval *tv) { int i, j, pos = 0; int n = get_mode_size_bits(tv->mode); - int bytes = n / 8 + ((n & 7) != 0); + int bytes = (n + 7) / 8; char *res = malloc((n + 1) * sizeof(char)); unsigned char byte; -- 2.20.1