mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
simulator_mavlink: consistent system call scope operator
This commit is contained in:
committed by
Daniel Agar
parent
6178ead6ea
commit
73f4706597
@@ -679,8 +679,8 @@ void Simulator::pollForMAVLinkMessages(bool publish)
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// Once we receive something, we're most probably good and can carry on.
|
// Once we receive something, we're most probably good and can carry on.
|
||||||
int len = recvfrom(_fd, _buf, sizeof(_buf), 0,
|
int len = ::recvfrom(_fd, _buf, sizeof(_buf), 0,
|
||||||
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
||||||
|
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
break;
|
break;
|
||||||
@@ -716,7 +716,7 @@ void Simulator::pollForMAVLinkMessages(bool publish)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
close(_fd);
|
::close(_fd);
|
||||||
system_sleep(1);
|
system_sleep(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -798,8 +798,8 @@ void Simulator::pollForMAVLinkMessages(bool publish)
|
|||||||
|
|
||||||
if (fds[0].revents & POLLIN) {
|
if (fds[0].revents & POLLIN) {
|
||||||
|
|
||||||
int len = recvfrom(_fd, _buf, sizeof(_buf), 0,
|
int len = ::recvfrom(_fd, _buf, sizeof(_buf), 0,
|
||||||
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
||||||
|
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
mavlink_message_t msg;
|
mavlink_message_t msg;
|
||||||
|
|||||||
Reference in New Issue
Block a user