context CHANGE always return non-const module
Refs #1645
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 0658a33..b4e0bea 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -819,10 +819,10 @@
if (!*mod) {
if (revision) {
/* get the specific revision */
- *mod = (struct lys_module *)ly_ctx_get_module(ctx, name, revision);
+ *mod = ly_ctx_get_module(ctx, name, revision);
} else {
/* get the requested module of the latest revision in the context */
- *mod = (struct lys_module *)ly_ctx_get_module_latest(ctx, name);
+ *mod = ly_ctx_get_module_latest(ctx, name);
if (*mod && ((*mod)->latest_revision == 1)) {
/* let us now search with callback and searchpaths to check if there is newer revision outside the context */
ctx_latest = *mod;