@@ -1998,7 +1998,6 @@ lyd_parse_json_restconf(const struct ly_ctx *ctx, const struct lysc_ext_instance
19981998 struct lyd_json_ctx * lydctx ;
19991999 enum LYJSON_PARSER_STATUS status ;
20002000 uint32_t i , int_opts = 0 , close_elem = 0 ;
2001- ly_bool parsed_data_nodes = 0 ;
20022001
20032002 assert (ctx && in && lydctx_p );
20042003 assert (!(parse_opts & ~LYD_PARSE_OPTS_MASK ));
@@ -2054,7 +2053,6 @@ lyd_parse_json_restconf(const struct ly_ctx *ctx, const struct lysc_ext_instance
20542053 do {
20552054 r = lydjson_subtree_r (lydctx , parent , first_p , parsed );
20562055 LY_DPARSER_ERR_GOTO (r , rc = r , lydctx , cleanup );
2057- parsed_data_nodes = 1 ;
20582056
20592057 status = lyjson_ctx_status (lydctx -> jsonctx );
20602058
@@ -2093,11 +2091,6 @@ lyd_parse_json_restconf(const struct ly_ctx *ctx, const struct lysc_ext_instance
20932091 r = lydjson_metadata_finish (lydctx , parent ? lyd_node_child_p (parent ) : first_p );
20942092 LY_CHECK_ERR_GOTO (r , rc = r , cleanup );
20952093
2096- if (!parsed_data_nodes ) {
2097- /* no data nodes were parsed */
2098- lydctx -> op_node = NULL ;
2099- }
2100-
21012094cleanup :
21022095 /* there should be no unres stored if validation should be skipped */
21032096 assert (!(parse_opts & LYD_PARSE_ONLY ) || (!lydctx -> node_types .count && !lydctx -> meta_types .count &&
0 commit comments