Skip to content

Commit b26e5ea

Browse files
committed
Linting
1 parent 08ca489 commit b26e5ea

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

rmw_microxrcedds_c/include/rmw_microros/rmw_microros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern "C"
4949
#elif defined(RMW_UXRCE_TRANSPORT_IPV6)
5050
#define MAX_IP_LEN 39
5151
#endif // ifdef RMW_UXRCE_TRANSPORT_IPV4
52-
#define MAX_PORT_LEN 6 // uint16_t max size + NULL-end string
52+
#define MAX_PORT_LEN 6 // uint16_t max size + NULL-end string
5353
#define MAX_SERIAL_DEVICE 50
5454

5555
typedef struct rmw_uxrce_transport_params_t

rmw_microxrcedds_c/src/rmw_microros/init_options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ rmw_ret_t rmw_uros_options_set_udp_address(
9090
return RMW_RET_INVALID_ARGUMENT;
9191
}
9292

93-
if (ip != NULL && strlen(ip) < MAX_IP_LEN) {
93+
if (ip != NULL && strlen(ip) <= MAX_IP_LEN) {
9494
snprintf(rmw_options->impl->transport_params.agent_address, MAX_IP_LEN, "%s", ip);
9595
} else {
9696
RMW_UROS_TRACE_MESSAGE("default ip configuration error")
9797
return RMW_RET_INVALID_ARGUMENT;
9898
}
9999

100-
if (port != NULL && strlen(port) <= MAX_PORT_LEN) {
100+
if (port != NULL && strlen(port) < MAX_PORT_LEN) {
101101
snprintf(rmw_options->impl->transport_params.agent_port, MAX_PORT_LEN, "%s", port);
102102
} else {
103103
RMW_UROS_TRACE_MESSAGE("default port configuration error")

0 commit comments

Comments
 (0)