tree data BUGFIX uniinitialized variable
diff --git a/src/tree_data.c b/src/tree_data.c
index 6f7854a..a5af00e 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -4367,14 +4367,13 @@
lyd_find_xpath(const struct lyd_node *ctx_node, const char *xpath, struct ly_set **set)
{
LY_ERR ret = LY_SUCCESS;
- struct lyxp_set xp_set;
+ struct lyxp_set xp_set = {0};
struct lyxp_expr *exp = NULL;
uint32_t i;
LY_CHECK_ARG_RET(NULL, ctx_node, xpath, set, LY_EINVAL);
*set = NULL;
- memset(&xp_set, 0, sizeof xp_set);
/* compile expression */
ret = lyxp_expr_parse((struct ly_ctx *)LYD_CTX(ctx_node), xpath, 0, 1, &exp);
@@ -4417,7 +4416,7 @@
lyd_eval_xpath(const struct lyd_node *ctx_node, const char *xpath, ly_bool *result)
{
LY_ERR ret = LY_SUCCESS;
- struct lyxp_set xp_set;
+ struct lyxp_set xp_set = {0};
struct lyxp_expr *exp = NULL;
LY_CHECK_ARG_RET(NULL, ctx_node, xpath, result, LY_EINVAL);