[Spice-devel] [PATCH spice-server 01/10] dispatcher: Use NULL for pointer check
Jonathon Jongsma
jjongsma at redhat.com
Wed Mar 20 15:51:28 UTC 2019
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Wed, 2019-03-20 at 09:59 +0000, Frediano Ziglio wrote:
> handler is a pointer, check for NULL, not 0.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/dispatcher.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/server/dispatcher.c b/server/dispatcher.c
> index ce487f63..5f839ec4 100644
> --- a/server/dispatcher.c
> +++ b/server/dispatcher.c
> @@ -341,7 +341,7 @@ void dispatcher_register_handler(Dispatcher
> *dispatcher, uint32_t message_type,
> DispatcherMessage *msg;
>
> assert(message_type < dispatcher->priv->max_message_type);
> - assert(dispatcher->priv->messages[message_type].handler == 0);
> + assert(dispatcher->priv->messages[message_type].handler ==
> NULL);
> msg = &dispatcher->priv->messages[message_type];
> msg->handler = handler;
> msg->size = size;
More information about the Spice-devel
mailing list