simplify code
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 6 Oct 2004 08:22:31 +0000 (08:22 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 6 Oct 2004 08:22:31 +0000 (08:22 +0000)
[r4061]

ir/tv/tv.c

index d348ce2..e7c1892 100644 (file)
@@ -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;