On Sat, 11 May 2024 at 12:54, Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> Hoist the "master vs apprentice" label to apprentice(), since
> we will want different labels for dumping.  Remove all of the
> "mismatch" text from reginfo_dump_mismatch -- just print "vs".
>
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> ---
>  risu.h                     |  4 ++--
>  risu.c                     |  1 +
>  risu_reginfo_aarch64.c     | 12 +++++-------
>  risu_reginfo_arm.c         | 18 +++++++++---------
>  risu_reginfo_i386.c        |  6 +-----
>  risu_reginfo_loongarch64.c | 11 ++++-------
>  risu_reginfo_m68k.c        | 23 +++++++----------------
>  risu_reginfo_ppc64.c       | 25 ++++++++++++-------------
>  risu_reginfo_s390x.c       | 18 +++++++-----------
>  9 files changed, 48 insertions(+), 70 deletions(-)
>
> diff --git a/risu.h b/risu.h
> index 2c43384..1b87af2 100644
> --- a/risu.h
> +++ b/risu.h
> @@ -123,8 +123,8 @@ int reginfo_is_eq(struct reginfo *r1, struct reginfo *r2);
>  /* print reginfo state to a stream, returns 1 on success, 0 on failure */
>  int reginfo_dump(struct reginfo *ri, FILE * f);
>
> -/* reginfo_dump_mismatch: print mismatch details to a stream, ret nonzero=ok 
> */
> -int reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f);
> +/* reginfo_dump_mismatch: print mismatch details to a stream */
> +void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f);

This commit is also changing the return type of the function,
which the commit message doesn't say anything about. Since this
is only risu, not QEMU proper, I don't think we strictly need
to disentangle this into two commits, but we should describe
both changes in the commit message.

(Since the only callsite doesn't check the return value and
in any case if it cared it could call ferror() itself,
switching to 'void' is fine.)

thanks
-- PMM

Reply via email to