From ad23c3fb6c9cd4bb6b9f39a8f2df33197e11dd37 Mon Sep 17 00:00:00 2001 From: eeff <33566201+eeff@users.noreply.github.com> Date: Fri, 18 Mar 2022 14:44:24 +0800 Subject: [PATCH] Fix function msg_external_data_get_size --- src/core/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/message.c b/src/core/message.c index 75a890dd..d194701d 100644 --- a/src/core/message.c +++ b/src/core/message.c @@ -67,7 +67,7 @@ size_t msg_external_data_get_size() void msg_with_struct_init(message_t *msg, msg_type_e type, void *struct_ptr, size_t struct_size) { - if (!(msg != NULL && struct_ptr != NULL && 0 != struct_size)) { + if (msg == NULL || (struct_ptr == NULL && 0 != struct_size)) { log_error("msg_with_struct_init called with NULL pointr"); return; }