mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 12:37:34 +08:00
mavlink: use LL_FOREACH
This commit is contained in:
@@ -401,14 +401,12 @@ Mavlink::instance_exists(const char *device_name, Mavlink *self)
|
||||
void
|
||||
Mavlink::forward_message(mavlink_message_t *msg, Mavlink *self)
|
||||
{
|
||||
Mavlink *inst = ::_mavlink_instances;
|
||||
|
||||
while (inst != nullptr) {
|
||||
/* don't broadcast to itself */
|
||||
|
||||
Mavlink *inst;
|
||||
LL_FOREACH(_mavlink_instances, inst) {
|
||||
if (inst != self) {
|
||||
inst->pass_message(msg);
|
||||
}
|
||||
inst = inst->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user