aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gps/core/UlpProxyBase.h6
-rw-r--r--gps/loc_api/libloc_api_50001/LocEngAdapter.cpp8
2 files changed, 9 insertions, 5 deletions
diff --git a/gps/core/UlpProxyBase.h b/gps/core/UlpProxyBase.h
index 59e265e..efcf98a 100644
--- a/gps/core/UlpProxyBase.h
+++ b/gps/core/UlpProxyBase.h
@@ -30,7 +30,9 @@
#define ULP_PROXY_BASE_H
#include <gps_extended.h>
-#include "fused_location_extended.h"
+
+struct FlpExtLocation_s;
+struct FlpExtBatchOptions;
namespace loc_core {
@@ -73,7 +75,7 @@ public:
bool active) {
return false;
}
- inline virtual bool reportPositions(const FlpExtLocation* locations,
+ inline virtual bool reportPositions(const struct FlpExtLocation_s* locations,
int32_t number_of_locations) {
return false;
}
diff --git a/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp b/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp
index 35447d4..bea21d9 100644
--- a/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp
+++ b/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp
@@ -190,9 +190,11 @@ void LocEngAdapter::setXtraUserAgent() {
fclose(file);
// remove trailing spaces
- size_t len = strlen(buf);
- while (--len >= 0 && isspace(buf[len])) {
- buf[len] = '\0';
+ char *s;
+ s = buf + strlen(buf);
+ while (--s >= buf) {
+ if (!isspace(*s)) break;
+ *s = 0;
}
}