Commit c427f235 authored by Pekka Pessi's avatar Pekka Pessi

msg_basic.c: fixed klocwork issues

parent baadadb0
......@@ -212,10 +212,11 @@ MSG_HEADER_CLASS(msg_, payload, NULL, "", pl_common, append,
msg_payload_t *msg_payload_create(su_home_t *home, void const *data, usize_t len)
msg_header_t *h = msg_header_alloc(home, msg_payload_class, len + 1);
msg_payload_t *pl = h->sh_payload;
if (pl) {
if (h) {
msg_payload_t *pl = (msg_payload_t *)h;
char *b = msg_header_data(h->sh_common);
if (data)
memcpy(b, data, len);
......@@ -227,6 +228,7 @@ msg_payload_t *msg_payload_create(su_home_t *home, void const *data, usize_t len
return pl;
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment