Skip to content

Commit

Permalink
RISC-V: Make `no_aliases' bool
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
a4lg committed Jul 13, 2022
1 parent 4ff62b5 commit 258ba28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opcodes/riscv-dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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;
Expand Down Expand Up @@ -96,7 +96,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;
}

Expand Down Expand Up @@ -138,7 +138,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
Expand Down

0 comments on commit 258ba28

Please sign in to comment.