diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 4208ba1bd2..b47f034144 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2016-09-21 Richard Sandiford + + * aarch64-gen.c (indented_print): Avoid hard-coded indentation limit. + 2016-09-15 Claudiu Zissulescu * arc-dis.c (find_format): Walk the linked list pointed by einsn. diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c index ed0834a7ac..a62f6c8e00 100644 --- a/opcodes/aarch64-gen.c +++ b/opcodes/aarch64-gen.c @@ -378,13 +378,9 @@ initialize_decoder_tree (void) static void __attribute__ ((format (printf, 2, 3))) indented_print (unsigned int indent, const char *format, ...) { - /* 80 number of spaces pluc a NULL terminator. */ - static const char spaces[81] = - " "; va_list ap; va_start (ap, format); - assert (indent <= 80); - printf ("%s", &spaces[80 - indent]); + printf ("%*s", (int) indent, ""); vprintf (format, ap); va_end (ap); }