forked from Archive/PX4-Autopilot
navigator: Removed static where no static should have been used
This commit is contained in:
parent
15e65fda26
commit
95e6fc30e2
|
@ -100,8 +100,8 @@ bool MissionFeasibilityChecker::checkGeofence(dm_item_t dm_current, size_t nMiss
|
||||||
/* Check if all mission items are inside the geofence (if we have a valid geofence) */
|
/* Check if all mission items are inside the geofence (if we have a valid geofence) */
|
||||||
if (geofence.valid()) {
|
if (geofence.valid()) {
|
||||||
for (size_t i = 0; i < nMissionItems; i++) {
|
for (size_t i = 0; i < nMissionItems; i++) {
|
||||||
static struct mission_item_s missionitem;
|
struct mission_item_s missionitem;
|
||||||
const ssize_t len = sizeof(struct mission_item_s);
|
const ssize_t len = sizeof(missionitem);
|
||||||
|
|
||||||
if (dm_read(dm_current, i, &missionitem, len) != len) {
|
if (dm_read(dm_current, i, &missionitem, len) != len) {
|
||||||
/* not supposed to happen unless the datamanager can't access the SD card, etc. */
|
/* not supposed to happen unless the datamanager can't access the SD card, etc. */
|
||||||
|
@ -125,8 +125,8 @@ bool MissionFeasibilityChecker::checkFixedWingLanding(dm_item_t dm_current, size
|
||||||
|
|
||||||
|
|
||||||
for (size_t i = 0; i < nMissionItems; i++) {
|
for (size_t i = 0; i < nMissionItems; i++) {
|
||||||
static struct mission_item_s missionitem;
|
struct mission_item_s missionitem;
|
||||||
const ssize_t len = sizeof(struct mission_item_s);
|
const ssize_t len = sizeof(missionitem);
|
||||||
if (dm_read(dm_current, i, &missionitem, len) != len) {
|
if (dm_read(dm_current, i, &missionitem, len) != len) {
|
||||||
/* not supposed to happen unless the datamanager can't access the SD card, etc. */
|
/* not supposed to happen unless the datamanager can't access the SD card, etc. */
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue