Skip to content
Snippets Groups Projects
Commit 8bd61a93 authored by Beat Küng's avatar Beat Küng
Browse files

uORBDevices: avoid memset, use braced initializer instead

parent 19a12ba7
No related branches found
No related tags found
No related merge requests found
......@@ -142,14 +142,12 @@ uORB::DeviceNode::open(device::file_t *filp)
if (FILE_FLAGS(filp) == PX4_F_RDONLY) {
/* allocate subscriber data */
SubscriberData *sd = new SubscriberData;
SubscriberData *sd = new SubscriberData{};
if (nullptr == sd) {
return -ENOMEM;
}
memset(sd, 0, sizeof(*sd));
/* default to no pending update */
sd->generation = _generation;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment