1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

can: fix nullptr check

This commit is contained in:
Steffen Vogel 2021-09-13 15:01:27 +02:00
parent a37d6c131b
commit b7b988ed64

View file

@ -152,10 +152,10 @@ int can_parse(struct vnode *n, json_t *json)
if (!c->in)
throw MemoryAllocationError();
c->out = (struct can_signal*)calloc(
c->out = (struct can_signal*) calloc(
json_array_size(json_out_signals),
sizeof(struct can_signal));
if (c->out)
if (!c->out)
throw MemoryAllocationError();
json_array_foreach(json_in_signals, i, json_signal) {