We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3f7d23 commit 8af504fCopy full SHA for 8af504f
gpsd_client/src/client.cpp
@@ -48,12 +48,12 @@ namespace gpsd_client
48
publish_period_ms = std::chrono::milliseconds{(int)(1000 / publish_rate_)};
49
50
std::string host = "localhost";
51
- int port = 2947;
+ int port = atoi(DEFAULT_GPSD_PORT);
52
this->get_parameter_or("host", host, host);
53
this->get_parameter_or("port", port, port);
54
55
char port_s[12];
56
- snprintf(port_s, 12, "%d", port);
+ snprintf(port_s, sizeof(port_s), "%d", port);
57
58
gps_data_t* resp = nullptr;
59
0 commit comments