aarch64: Fix coding style issue in `aarch64-dis.c'

Message ID 20240422093500.46611-1-victor.donascimento@arm.com
State Committed
Headers
Series aarch64: Fix coding style issue in `aarch64-dis.c' |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 warning Patch is already merged

Commit Message

Victor Do Nascimento April 22, 2024, 9:35 a.m. UTC
  Fix integer value being returned from boolean function, as introduced
in `aarch64: Remove asserts from operand qualifier decoders [PR31595]'.
---
 opcodes/aarch64-dis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Christophe Lyon April 22, 2024, 12:26 p.m. UTC | #1
Hi Victor,

On Mon, 22 Apr 2024 at 11:35, Victor Do Nascimento
<victor.donascimento@arm.com> wrote:
>
> Fix integer value being returned from boolean function, as introduced
> in `aarch64: Remove asserts from operand qualifier decoders [PR31595]'.
> ---
>  opcodes/aarch64-dis.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
> index b70e6da9eb7..e1c3f557874 100644
> --- a/opcodes/aarch64-dis.c
> +++ b/opcodes/aarch64-dis.c
> @@ -1038,7 +1038,7 @@ aarch64_ext_ft (const aarch64_operand *self ATTRIBUTE_UNUSED,
>         return false;
>        info->qualifier = get_sreg_qualifier_from_value (value);
>        if (info->qualifier == AARCH64_OPND_QLF_ERR)
> -       return 0;
> +       return false;
>      }
>
>    return true;
> --
> 2.34.1
>

I'd say this counts as 'obvious' ?

Thanks,

Christophe
  
Richard Earnshaw (lists) April 23, 2024, 12:13 p.m. UTC | #2
On 22/04/2024 10:35, Victor Do Nascimento wrote:
> Fix integer value being returned from boolean function, as introduced
> in `aarch64: Remove asserts from operand qualifier decoders [PR31595]'.
> ---
>  opcodes/aarch64-dis.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
> index b70e6da9eb7..e1c3f557874 100644
> --- a/opcodes/aarch64-dis.c
> +++ b/opcodes/aarch64-dis.c
> @@ -1038,7 +1038,7 @@ aarch64_ext_ft (const aarch64_operand *self ATTRIBUTE_UNUSED,
>  	return false;
>        info->qualifier = get_sreg_qualifier_from_value (value);
>        if (info->qualifier == AARCH64_OPND_QLF_ERR)
> -	return 0;
> +	return false;
>      }
>  
>    return true;


OK, thanks.

R.
  

Patch

diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index b70e6da9eb7..e1c3f557874 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -1038,7 +1038,7 @@  aarch64_ext_ft (const aarch64_operand *self ATTRIBUTE_UNUSED,
 	return false;
       info->qualifier = get_sreg_qualifier_from_value (value);
       if (info->qualifier == AARCH64_OPND_QLF_ERR)
-	return 0;
+	return false;
     }
 
   return true;