Skip to content

Commit 16ba149

Browse files
committed
tests REFACTOR redundant function
1 parent 4508b2b commit 16ba149

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

tests/utests/schema/test_printer_tree.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,26 +1922,6 @@ yang_data(void **state)
19221922
TEST_LOCAL_TEARDOWN;
19231923
}
19241924

1925-
static LY_ERR
1926-
getter(const struct lysc_ext_instance *ext, const struct lyd_node *UNUSED(parent), void *user_data, void **ext_data,
1927-
ly_bool *ext_data_free)
1928-
{
1929-
struct ly_ctx *ctx;
1930-
struct lyd_node *data = NULL;
1931-
1932-
ctx = ext->module->ctx;
1933-
if (user_data) {
1934-
/* parse using the parent context */
1935-
ly_ctx_set_ext_data_clb(ctx, getter, NULL);
1936-
assert_int_equal(LY_SUCCESS, lyd_parse_data_mem(ctx, user_data, LYD_XML, LYD_PARSE_ONLY, 0, &data));
1937-
ly_ctx_set_ext_data_clb(ctx, getter, user_data);
1938-
}
1939-
1940-
*ext_data = data;
1941-
*ext_data_free = 1;
1942-
return LY_SUCCESS;
1943-
}
1944-
19451925
#define SM_MODNAME_EXT "sm-extension"
19461926
#define SM_MOD_EXT_NAMESPACE "urn:sm-ext"
19471927
#define SM_PREF "sm"

0 commit comments

Comments
 (0)