[Spice-devel] [PATCH spice-server 01/10] dispatcher: Use NULL for pointer check
Frediano Ziglio
fziglio at redhat.com
Wed Mar 20 09:59:10 UTC 2019
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;
--
2.20.1
More information about the Spice-devel
mailing list