From 021fdc9f1c21d199d06b37bf3751fe1b9e06e8f0 Mon Sep 17 00:00:00 2001 From: Tsukasa OI Date: Mon, 11 Jul 2022 11:30:04 +0900 Subject: [PATCH] RISC-V: Make `no_aliases' bool This commit changes the type of `no_aliases' from int to bool to prepare adding more boolean options (bool is widely used on riscv-dis.c already). opcodes/ChangeLog: * riscv-dis.c (no_aliases) Change type from int to bool. (set_default_riscv_dis_options): Use a boolean literal. (parse_riscv_dis_option_without_args): Likewise. --- opcodes/riscv-dis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index b360d627918..afff4b2312a 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -70,7 +70,7 @@ static const char * const *riscv_gpr_names; static const char * const *riscv_fpr_names; /* If set, disassemble as most general instruction. */ -static int no_aliases; +static bool no_aliases = false; /* If set, disassemble with numeric registers. */ static bool is_numeric = false; @@ -121,7 +121,7 @@ init_riscv_dis_state_for_arch_and_options (void) static void set_default_riscv_dis_options (void) { - no_aliases = 0; + no_aliases = false; is_numeric = false; } @@ -163,7 +163,7 @@ static bool parse_riscv_dis_option_without_args (const char *option) { if (strcmp (option, "no-aliases") == 0) - no_aliases = 1; + no_aliases = true; else if (strcmp (option, "numeric") == 0) is_numeric = true; else