Skip to content

Commit

Permalink
Improving port parameter initialization (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
danthony06 authored May 10, 2024
1 parent 6f5963e commit ecf8df8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpsd_client/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ecf8df8

Please sign in to comment.