Skip to content

Commit

Permalink
remove error msg for node name before key to allow for both keys para…
Browse files Browse the repository at this point in the history
…m/descriptor keys under node name

Signed-off-by: Brian Wilcox <[email protected]>
  • Loading branch information
bpwilcox committed Jun 29, 2021
1 parent a5939aa commit 27674f6
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions rcl_yaml_param_parser/src/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,6 @@ rcutils_ret_t parse_key(
{
/// Till we get PARAMS_KEY or PARAMS_DESCRIPTORS_KEY, keep adding to node namespace
if (0 == strncmp(PARAMS_KEY, value, strlen(PARAMS_KEY))) {
if (0U == ns_tracker->num_node_ns) {
RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(
"There are no node names before %s at line %d", PARAMS_KEY, line_num);
ret = RCUTILS_RET_ERROR;
break;
}

if (*is_new_map) {
/// The previous key(last name in namespace) was the node name. Remove it
/// from the namespace
Expand Down Expand Up @@ -824,13 +817,6 @@ rcutils_ret_t parse_key(
/// Bump the map level to PARAMS
(*map_level)++;
} else if (0 == strncmp(PARAMS_DESCRIPTORS_KEY, value, strlen(PARAMS_DESCRIPTORS_KEY))) {
if (0U == ns_tracker->num_node_ns) {
RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(
"There are no node names before %s at line %d", PARAMS_DESCRIPTORS_KEY, line_num);
ret = RCUTILS_RET_ERROR;
break;
}

if (*is_new_map) {
/// The previous key(last name in namespace) was the node name. Remove it
/// from the namespace
Expand Down

0 comments on commit 27674f6

Please sign in to comment.