diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 0c8ff2c..f41fea4 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -23,12 +23,12 @@ class GPSDClient { privnode.param("frame_id", frame_id, frame_id); std::string host = "localhost"; - int port = 2947; + int port = atoi(DEFAULT_GPSD_PORT); privnode.getParam("host", host); privnode.getParam("port", port); char port_s[12]; - snprintf(port_s, 12, "%d", port); + snprintf(port_s, sizeof(port_s), "%d", port); gps_data_t *resp = NULL;