We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b36be02 commit e592a56Copy full SHA for e592a56
gpsd_client/src/client.cpp
@@ -27,6 +27,7 @@
27
#include <sensor_msgs/NavSatFix.h>
28
#include <sensor_msgs/NavSatStatus.h>
29
30
+#include <cstdlib>
31
#include <cmath>
32
33
using namespace gps_common;
@@ -45,12 +46,12 @@ class GPSDClient {
45
46
privnode.param("frame_id", frame_id, frame_id);
47
48
std::string host = "localhost";
- int port = 2947;
49
+ int port = atoi(DEFAULT_GPSD_PORT);
50
privnode.getParam("host", host);
51
privnode.getParam("port", port);
52
53
char port_s[12];
- snprintf(port_s, 12, "%d", port);
54
+ snprintf(port_s, sizeof(port_s), "%d", port);
55
56
gps_data_t *resp = NULL;
57
0 commit comments