Skip to content

Commit e5754f0

Browse files
authored
Fixed warning (ros2#1350)
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
1 parent cd7b683 commit e5754f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎rcl/src/rcl/expand_topic_name.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ rcl_expand_topic_name(
136136
//
137137
// These assumptions are taken because this is checked in the validation function.
138138
const char * current_output = (local_output) ? local_output : input_topic_name;
139-
char * next_opening_brace = NULL;
139+
const char * next_opening_brace = NULL;
140140
// current_output may be replaced on each loop if a substitution is made
141141
while ((next_opening_brace = strchr(current_output, '{')) != NULL) {
142-
char * next_closing_brace = strchr(current_output, '}');
142+
const char * next_closing_brace = strchr(current_output, '}');
143143
// conclusion based on above assumptions: next_closing_brace - next_opening_brace > 1
144144
size_t substitution_substr_len = next_closing_brace - next_opening_brace + 1;
145145
// figure out what the replacement is for this substitution

0 commit comments

Comments
 (0)