qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 04/12] monitor: remove usage of generated mar


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 04/12] monitor: remove usage of generated marshal functions
Date: Fri, 05 Aug 2016 15:43:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Hi
>
> ----- Original Message -----
>> address@hidden writes:
>> 
>> > From: Marc-André Lureau <address@hidden>
>> >
>> > Once the middle mode is removed, the generated marshal functions will no
>> > longer be exported.
>> >
>> > Signed-off-by: Marc-André Lureau <address@hidden>
>> > Reviewed-by: Eric Blake <address@hidden>
>> > ---
>> >  monitor.c | 10 +++++-----
>> >  1 file changed, 5 insertions(+), 5 deletions(-)
>> >
>> > diff --git a/monitor.c b/monitor.c
>> > index c9191e5..3a28b43 100644
>> > --- a/monitor.c
>> > +++ b/monitor.c
>> > @@ -3659,21 +3659,21 @@ static int monitor_can_read(void *opaque)
>> >      return (mon->suspend_cnt == 0) ? 1 : 0;
>> >  }
>> >  
>> > -static bool invalid_qmp_mode(const Monitor *mon, const mon_cmd_t *cmd,
>> > +static bool invalid_qmp_mode(const Monitor *mon, const char *cmd,
>> >                               Error **errp)
>> >  {
>> > -    bool is_cap = cmd->mhandler.cmd_new == qmp_marshal_qmp_capabilities;
>> > +    bool is_cap = !g_strcmp0(cmd, "qmp_capabilities");
>> 
>> What's wrong with strcmp()?
>> 
>
> g_strcmp0() is a slightly safer version, it's just an habit, I guess it 
> doesn't matter here, would you like to change it?

Yes.

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]