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:
parent
a37d6c131b
commit
b7b988ed64
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue