From 43eaf467e0d75a179a74900d11ac9b731f567101 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 7 Dec 2023 21:22:23 -0500 Subject: [PATCH] lib: fix checkpatch warnings Signed-off-by: Christian Hopps --- lib/yang.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/yang.c b/lib/yang.c index 90c494a052a9..a75eacc57f84 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -698,6 +698,7 @@ uint8_t *yang_print_tree(const struct lyd_node *root, LYD_FORMAT format, uint32_t options) { uint8_t *darr = NULL; + if (yang_print_tree_append(&darr, root, format, options)) return NULL; return darr; @@ -743,6 +744,7 @@ struct ly_ctx *yang_ctx_new_setup(bool embedded_modules, bool explicit_compile) { struct ly_ctx *ctx = NULL; const char *yang_models_path = YANG_MODELS_PATH; + uint options; LY_ERR err; if (access(yang_models_path, R_OK | X_OK)) { @@ -756,7 +758,7 @@ struct ly_ctx *yang_ctx_new_setup(bool embedded_modules, bool explicit_compile) YANG_MODELS_PATH); } - uint options = LY_CTX_NO_YANGLIBRARY | LY_CTX_DISABLE_SEARCHDIR_CWD; + options = LY_CTX_NO_YANGLIBRARY | LY_CTX_DISABLE_SEARCHDIR_CWD; if (explicit_compile) options |= LY_CTX_EXPLICIT_COMPILE; err = ly_ctx_new(yang_models_path, options, &ctx);