mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +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) {
|
||||
// Once we receive something, we're most probably good and can carry on.
|
||||
int len = recvfrom(_fd, _buf, sizeof(_buf), 0,
|
||||
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
||||
int len = ::recvfrom(_fd, _buf, sizeof(_buf), 0,
|
||||
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
||||
|
||||
if (len > 0) {
|
||||
break;
|
||||
@@ -716,7 +716,7 @@ void Simulator::pollForMAVLinkMessages(bool publish)
|
||||
break;
|
||||
|
||||
} else {
|
||||
close(_fd);
|
||||
::close(_fd);
|
||||
system_sleep(1);
|
||||
}
|
||||
}
|
||||
@@ -798,8 +798,8 @@ void Simulator::pollForMAVLinkMessages(bool publish)
|
||||
|
||||
if (fds[0].revents & POLLIN) {
|
||||
|
||||
int len = recvfrom(_fd, _buf, sizeof(_buf), 0,
|
||||
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
||||
int len = ::recvfrom(_fd, _buf, sizeof(_buf), 0,
|
||||
(struct sockaddr *)&_srcaddr, (socklen_t *)&_addrlen);
|
||||
|
||||
if (len > 0) {
|
||||
mavlink_message_t msg;
|
||||
|
||||
Reference in New Issue
Block a user