summaryrefslogtreecommitdiffstats
path: root/src/schema_features.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-17 02:59:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-17 02:59:54 +0000
commit5bc4f4fb5b383ca32b382b6c0d09602346064414 (patch)
treec741e5844c2815679107d648a15841653b9b01a5 /src/schema_features.c
parentAdding upstream version 3.1.0+dfsg. (diff)
downloadlibyang3-upstream.tar.xz
libyang3-upstream.zip
Adding upstream version 3.4.2+dfsg.upstream/3.4.2+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/schema_features.c')
-rw-r--r--src/schema_features.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/schema_features.c b/src/schema_features.c
index 9f6c368..5552267 100644
--- a/src/schema_features.c
+++ b/src/schema_features.c
@@ -105,7 +105,7 @@ lys_identity_iffeature_value(const struct lysc_ident *ident)
const struct lysp_ident *idents_p, *found_ident = NULL;
struct lysp_include *includes;
- assert(ident);
+ LY_CHECK_ARG_RET(NULL, ident, ident->module->parsed, LY_EINVAL);
/* Search parsed identity in the module. */
idents_p = ident->module->parsed->identities;
@@ -146,6 +146,8 @@ lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmo
{
struct lysp_feature *features;
+ LY_CHECK_ARG_RET(NULL, pmod, NULL);
+
if (!*idx) {
/* module features */
features = pmod->features;