Skip to content

Commit 78b7795

Browse files
committed
tree data UPDATE always log errors
1 parent 7e5501f commit 78b7795

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/tree_data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2722,7 +2722,7 @@ LIBYANG_API_DECL LY_ERR lyd_leafref_link_node_tree(const struct lyd_node *tree);
27222722
/**
27232723
* @brief Check a string matches an XML Schema regex used in YANG.
27242724
*
2725-
* @param[in] ctx Optional context for logging.
2725+
* @param[in] ctx Optional context for storing errors.
27262726
* @param[in] pattern Regular expression pattern to use.
27272727
* @param[in] string String to match.
27282728
* @param[in] str_len Length of @p string, may be 0 if string is 0-terminated.

src/tree_data_common.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,9 +1898,7 @@ ly_pattern_match(const struct ly_ctx *ctx, const char *pattern, const char *stri
18981898
}
18991899
r = ly_pattern_code_match(code, string, str_len, &err);
19001900
if (r && (r != LY_ENOT)) {
1901-
if (ctx) {
1902-
ly_err_print(ctx, err);
1903-
}
1901+
ly_err_print(ctx, err);
19041902
ly_err_free(err);
19051903
return r;
19061904
}

0 commit comments

Comments
 (0)