diff mbox series

[PATCH-for-7.0,1/2] block: Fix misleading hexadecimal format

Message ID 20220323114718.58714-2-philippe.mathieu.daude@gmail.com (mailing list archive)
State New, archived
Headers show
Series misc: Fix misleading hexadecimal format | expand

Commit Message

Philippe Mathieu-Daudé March 23, 2022, 11:47 a.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

"0x%u" format is very misleading, replace by "0x%x".

Found running:

  $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/

Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 block/parallels-ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hanna Czenczek March 23, 2022, 11:55 a.m. UTC | #1
On 23.03.22 12:47, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
>    $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   block/parallels-ext.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Daniel P. Berrangé March 23, 2022, 12:05 p.m. UTC | #2
On Wed, Mar 23, 2022 at 12:47:17PM +0100, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> "0x%u" format is very misleading, replace by "0x%x".
> 
> Found running:
> 
>   $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
> 
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  block/parallels-ext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
Denis V. Lunev March 23, 2022, 12:12 p.m. UTC | #3
On 23.03.2022 14:47, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
>    $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   block/parallels-ext.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/parallels-ext.c b/block/parallels-ext.c
> index cb22a427d7..5122f67ac2 100644
> --- a/block/parallels-ext.c
> +++ b/block/parallels-ext.c
> @@ -261,7 +261,7 @@ static int parallels_parse_format_extension(BlockDriverState *bs,
>               break;
>   
>           default:
> -            error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
> +            error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
>               goto fail;
>           }
>   
Reviewed-by: Denis V. Lunev <den@openvz.org>
diff mbox series

Patch

diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index cb22a427d7..5122f67ac2 100644
--- a/block/parallels-ext.c
+++ b/block/parallels-ext.c
@@ -261,7 +261,7 @@  static int parallels_parse_format_extension(BlockDriverState *bs,
             break;
 
         default:
-            error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
+            error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
             goto fail;
         }